I want to specify following type of associations through FactoryGirl. I have three models A, B and C where model of C which is in DataMapper is as follows:
Class C do
include DataMapper::Resource
belongs_to :A, :key=>true
belongs_to :B, :key=>true
end
I don't know how to specify this in FactoryGirl i.e. what I mean is I want to write like this:
factory :c do |c|
<To be Filled>
end
Please help.