In FactoryBot 5 there's been a change in how associations are built (new
behavior is to use the parent build strategy, old behavior... not sure
what is the strategy then).
This new behavior broke some tests. For now old behavior is restored.
The new behavior is very briefly explained in:
https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#associations
The new (backwards-incompatible) behavior is also discussed in these
issues:
https://github.com/thoughtbot/factory_bot_rails/issues/314https://github.com/thoughtbot/factory_bot/issues/1255
FactoryBot dev has mentioned maybe writing a blog post explaining the
rationale behind the change and how to adapt tests. In the future the
old behavior will likely get deprecated. Whenever I decide to use the
new behavior in FeedBunch I'll have to check if there's a post in the
FactoryBot blog about this.
Trending Articles
More Pages to Explore .....