```ruby
FactoryGirl.define do
  factory :topic, :class => Forem::Topic do |t|
    t.subject "FIRST TOPIC"
    t.forum {|f| f.association(:forum) }
    t.user {|u| u.association(:user) }
    t.posts { |p| [p.association(:post)]}
  end
end```

Send through post attributes using posts_attributes when creating a topic
user
```ruby
FactoryGirl.define do
  factory :topic, :class => Forem::Topic do |t|
    t.subject "FIRST TOPIC"
    t.forum {|f| f.association(:forum) }
    t.user {|u| u.association(:user) }
    t.posts_attributes { [Factory.attributes_for(:post)] }
  end
end
```
assistant