Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated static attributes are still used in factories.rb #98

Open
ryanzidago opened this issue Jul 20, 2019 · 1 comment
Open

Deprecated static attributes are still used in factories.rb #98

ryanzidago opened this issue Jul 20, 2019 · 1 comment

Comments

@ryanzidago
Copy link

ryanzidago commented Jul 20, 2019

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
@ryanzidago ryanzidago changed the title Deprecated static attributes still used in factories.rb Deprecated static attributes are still used in factories.rb Jul 20, 2019
@andyw8
Copy link
Contributor

andyw8 commented Jul 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants