Here s my models :
Class Audition
belongs_to :video
end
Class Video
has_one :audition
end
and my factories :
Factory.define :video do |v|
v.filename {Sham.filename}
v.video_url {Sham.url}
end
Factory.define :audition do |a|
a.video {|a| a.association(:video)}
a.label {Sham.label}
end
How could I create a video factory that have an audition,
I mean, be able to :
v = Factory.create(:video)
v.audition # I d like this to be not nil !
Because I have an observer on my video that try to access the audition from the video object
I tried several things but I always end with a stack level too deep or audition nil.
Do you have an idea ?
Thanks, Mike