What are factory_girl transient attributes? Why would I use one?
问题 I read this from Thoughtbot but it's still confusing to me. This is their example: factory :user do transient do rockstar true upcased false end name { "John Doe#{" - Rockstar" if rockstar}" } email { "#{name.downcase}@example.com" } after(:create) do |user, evaluator| user.name.upcase! if evaluator.upcased end end create(:user, upcased: true).name #=> "JOHN DOE - ROCKSTAR" So, Is .upcased a real attribute on the model? What is the transient block really doing? Setting variables that can then