forked from bofh/fetsite
Upgraded to Rails 4
This commit is contained in:
@@ -3,14 +3,14 @@ require 'spec_helper'
|
||||
describe Modul do
|
||||
[:name].each do |attr|
|
||||
it "should not be valid without #{attr}" do
|
||||
modul = FactoryGirl.build(:modul)
|
||||
modul = FactoryBot.build(:modul)
|
||||
modul.send("#{attr}=".to_sym,nil)
|
||||
expect(modul).not_to be_valid
|
||||
expect(modul).to have_at_least(1).errors_on(attr)
|
||||
end
|
||||
end
|
||||
it "is valid with everything" do
|
||||
m = FactoryGirl.build(:modul)
|
||||
m = FactoryBot.build(:modul)
|
||||
expect(m).to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user