thoughtbot/factory_girl — Issue #263: Using traits for an association
Author: TMaYaD
Created: 2012-01-02 12:31:19+00:00
State: open

Can not use traits from association

factory :user do
trait :with_profile do
name "John Doe"
end
end

factory :subscription do
association :user, :traits => [:with_profile]
end

Gives the error "undefined method `traits=' for #"