testing-rails
testing-rails copied to clipboard
Deprecated static attributes are still used in factories.rb
Depracted static attributes are still used in factories.rb:
factory :link do
title "Testing Rails"
url "http://testingrailsbook.com"
trait :invalid do
title nil
end
end
end
Instead, the code should look like this with dynamic attributes:
factory :link do
title { "Testing Rails" }
url { "http://testingrailsbook.com" }
trait :invalid do
title { nil }
end
end
end
If this is changed, the example app should probably be updated to use 4.11.0 or a higher version of the factory_bot gem:
https://github.com/thoughtbot/factory_bot/blob/master/NEWS.md#4110-august-15-2018