Skip to content

Commit

Permalink
changing rspec syntax to utilize 'expect'
Browse files Browse the repository at this point in the history
  • Loading branch information
wrburgess committed May 10, 2013
1 parent 5f7cbbd commit 6019f90
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spec/models/step_ingredient_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
describe StepIngredient do

it 'has a valid factory' do
FactoryGirl.create(:step_ingredient).should be_valid
step_ingredient = FactoryGirl.create(:step_ingredient)
expect(step_ingredient).to be_valid
end

it 'is invalid without a step_id' do
FactoryGirl.build(:step_ingredient, step_id: nil).should_not be_valid
end
step_ingredient = FactoryGirl.build(:step_ingredient, step_id: nil)
expect(step_ingredient).to be_invalid
end

it 'is invalid without an ingredient_id' do
FactoryGirl.build(:step_ingredient, ingredient_id: nil).should_not be_valid
step_ingredient = FactoryGirl.build(:step_ingredient, ingredient_id: nil)
expect(step_ingredient).to be_invalid
end

it { should belong_to(:step) }
Expand Down

0 comments on commit 6019f90

Please sign in to comment.