Displaying 1 result from an estimated 1 matches for "common_field".
2010 Sep 25
3
Factory_girl association with specific values
Hope this should be simple: I have a User model and a Role model. Factories
for each.
When I create a User using FG, I want to assign a specific role. Cant seem
to figure out how to do this, getting errors like: uninitialized constant
SysadminRole for doing things this way:
Factory.define :user do |u|
u.practice_id { |a| a.association(:practice).id }
u.password ''password1''