ensl.org/spec/factories/topic.rb

10 lines
210 B
Ruby
Raw Normal View History

2015-08-20 14:49:42 +00:00
FactoryGirl.define do
factory :topic do
sequence(:title) { |n| "Forum Title #{n}" }
2015-08-20 14:58:10 +00:00
forum
user
before(:create) do |topic|
topic.first_post = "My first post on the topic"
end
2015-08-20 14:49:42 +00:00
end
end