Naming the association in the model makes the relationship easier to express in the factory.
6 lines
109 B
Ruby
6 lines
109 B
Ruby
FactoryGirl.define do
|
|
factory :user_role do
|
|
user
|
|
association :granter, :factory => :user
|
|
end
|
|
end
|