-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bump factory_bot_rails from 6.2.0 to 6.4.0 #2533
Conversation
This application is owned by the Access & Permissions team. Follow these steps if you are doing a Rails upgrade. |
@dependabot rebase |
Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 6.2.0 to 6.4.0. - [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases) - [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/main/NEWS.md) - [Commits](thoughtbot/factory_bot_rails@v6.2.0...v6.4.0) --- updated-dependencies: - dependency-name: factory_bot_rails dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
556ea3a
to
661de4d
Compare
Although top level traits (mixins) are allowed according to the docs[1], they appear to be broken in factory bot 6.4.0[2]. We were seeing the following error: NoMethodError: undefined method `<' for nil:NilClass if for_class < ActiveRecord::Base && for_class.primary_key == attribute.name.to_s When running either of the tests that used the `with_expired_confirmation_token` trait: - test/controllers/account/emails_controller_test.rb:99 - test/controllers/users/emails_controller_test.rb:277 Given that we're only using this trait in User factories I've moved it inside the User factory definition so that we can upgrade. [1]: https://thoughtbot.github.io/factory_bot/traits/mixins.html [2]: thoughtbot/factory_bot_rails#431
Although top level traits (mixins) are allowed according to the docs[1], they appear to be broken in factory bot 6.4.0[2]. We were seeing the following error: NoMethodError: undefined method `<' for nil:NilClass if for_class < ActiveRecord::Base && for_class.primary_key == attribute.name.to_s When running the tests that used the `in_organisation` trait. Given that we're only using this trait in User factories I've moved it inside the User factory definition so that we can upgrade. [1]: https://thoughtbot.github.io/factory_bot/traits/mixins.html [2]: thoughtbot/factory_bot_rails#431
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were seeing some failing tests after this upgrade because it seems that factory_bot 6.3.0 broke top-level traits (mixins) (see thoughtbot/factory_bot_rails#431). I've moved our top-level traits into the user factory which appears to have fixed the problem we're seeing.
Bumps factory_bot_rails from 6.2.0 to 6.4.0.
Release notes
Sourced from factory_bot_rails's releases.
Changelog
Sourced from factory_bot_rails's changelog.
Commits
3346305
Bump to 6.4.0 [ci skip]438d035
Bump to 6.3.0 [ci skip]f9a1e7c
Depend on factory_bot 6.4.xfd1ca67
s/eser/user/ (#422)659d74a
Add projections.json for Rails.vim support0040292
Reject sequence definitions for Active Record primary keys (#419)a28bec8
Bundler 2.4.19 removed the "Using " lines3995e62
Add custom Rails generator in README.md [ci skip]a0adccc
Remove references to travis30c85d5
Expand matrix for more recent versionsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)