[rspec-users] tests using factorygirl

S Ahmed sahmed1020 at gmail.com
Thu Mar 1 05:19:18 UTC 2012

I'm trying to use factory for a test case, but the model I am creating via
the factory depends on another model, how do you setup a factory like this?

Model Account has a location_id attribute (where Location is another model)

So how do I set it?

FactoryGirl..... do

  location_id  ????????/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120301/0d3367fb/attachment.html>

More information about the rspec-users mailing list