demarches-normaliennes/spec/factories/commentaire.rb
2018-01-12 11:32:43 +01:00

11 lines
218 B
Ruby

FactoryGirl.define do
factory :commentaire do
body 'plop'
before(:create) do |commentaire, _evaluator|
if !commentaire.dossier
commentaire.dossier = create :dossier
end
end
end
end