Adds model and controller tests for Question.
This commit is contained in:
parent
e25425bd77
commit
a04df00bdc
6 changed files with 311 additions and 24 deletions
|
|
@ -4,11 +4,11 @@ FactoryGirl.define do
|
|||
factory :answer do
|
||||
title 'I do'
|
||||
|
||||
factory :answer1 do
|
||||
factory :first_answer do
|
||||
title 'First Answer'
|
||||
end
|
||||
|
||||
factory :answer2 do
|
||||
factory :second_answer do
|
||||
title 'Second Answer'
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ FactoryGirl.define do
|
|||
title 'Which do you choose?'
|
||||
|
||||
after(:build) do |question|
|
||||
question.answers << build(:answer1)
|
||||
question.answers << build(:answer2)
|
||||
question.answers << build(:first_answer)
|
||||
question.answers << build(:second_answer)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue