Update factory_bot to 6.2.1 - #50912
Merged
Merged
Conversation
The very latest version of the library, now that we can do so; follow-up to #50768. Specifically target a version `>= 6.2.0` to pick up support for Ruby 3.0, in preparation for an eventual update to that version: https://github.com/thoughtbot/factory_bot/releases/tag/v6.2.0
Specifically target the latest 5.x version as a transitional step toward v6.2, which adds support for Ruby 3. Breaking changes in v5: - Removed support for EOL versions of Ruby and Rails - Removed static attributes (use dynamic attributes with a block instead) - Removed looking up factories by class - Removed ignore method (use transient instead) - Removed duplicate_attribute_assignment_from_initialize_with configuration option https://github.com/thoughtbot/factory_bot/releases/tag/v5.0.0
…factorybot v5" This reverts commit db87af3.
…so that its associated records are also persisted and able to be validated
…s to be persisted
Hamms
marked this pull request as ready for review
April 21, 2023 01:10
sureshc
approved these changes
Apr 25, 2023
This was referenced Apr 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The very latest version of the library, now that we can do so; follow-up to #50768. Specifically target a version
>= 6.2.0to pick up support for Ruby 3.0, in preparation for an eventual update to that version.The main breaking change which affects us in this transition is the change to the default build strategy for associated records; most of the necessary updates for that have already been applied (PR1, PR2), there's just one more in this PR which could've been included in the others but which slipped through the cracks.
Some other changes that affect us include the deprecation of static attributes in favor of dynamic attributes (PR), and the removal of
allow_class_lookupnow that it's no longer necessary (implemented in this PR). Changes that don't affect us mostly involve removal of support for old versions of Ruby and Rails and the deprecation of functionality that we aren't using.We could alternatively update first to 5.x as an intermediary before updating to 6.x, but there isn't a specific need to.
Links
Testing story
Relying on existing tests to verify that this update to a test library does not break anything.