Quantcast
Channel: FeedBunch:c0ca8896bfc335edf0f4aa76f56141c3ae7ed085 commits
Viewing all articles
Browse latest Browse all 40

Restore FactoryBot old behavior when building associations

$
0
0
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.

Viewing all articles
Browse latest Browse all 40

Latest Images

Trending Articles





Latest Images