4e2b7e0b3f
This allows defining associations with factories using traits by slicing up the hash passed to association. Passing an array to `:factory` will use the first item in the array as the factory, with any subsequent symbols as traits. Here's an example: factory :post do association :author, factory: [:user, :admin], name: 'John Doe' end Closes #395 |
||
---|---|---|
.. | ||
acceptance | ||
factory_girl | ||
support | ||
factory_girl_spec.rb | ||
spec_helper.rb |