thoughtbot/factory_girl — Issue #247: dynamic attributes in traits dont get evaluated in the expected order
Author: twalpole
Created: 2011-11-23 22:06:31+00:00
State: open

trait :email do
email { "#{name}@example.com" }
end

factory :user do
name "Bill"
email
combined { "#{name} <#{email}>" }
end

Creating an instance of user sets combined to "Bill <>" not the "Bill " I would expect