demarches-normaliennes/spec/factories/dossier.rb
2015-08-14 14:05:09 +02:00

14 lines
No EOL
371 B
Ruby

FactoryGirl.define do
factory :dossier do
formulaire_id 12
trait :with_entreprise do
after(:build) do |dossier, evaluator|
etablissement = create(:etablissement)
entreprise = create(:entreprise, etablissement: etablissement)
dossier.entreprise = entreprise
dossier.etablissement = etablissement
end
end
end
end