Skip to content

Commit

Permalink
Document 6.0.0 may break FactoryBot.lint
Browse files Browse the repository at this point in the history
In a sufficiently large codebase, the automatic definition of traits for
Active Record enum may result in more combinations being checked by
`FactoryBot.lint`. This breaking change may not be obvious because the
first impression of the error messages may be "these factories were
passing before the upgrade but now failing ?", while the truth is that
they don't exist before the upgrade.
  • Loading branch information
choznerol committed Sep 24, 2022
1 parent 893eb67 commit 710dd7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
* Added: automatic definition of traits for Active Record enum attributes, enabled by default
(Note that this required changing where factory_bot constantizes the build
class, which may affect applications that were using abstract factories for
inheritance. See issue #1409.)
inheritance. See issue #1409.) (This may break `FactoryBot.lint` because
there may be previously non-existing factory+trait combinations being
defined and checked)
* Added: `traits_for_enum` method to define traits for non-Active Record enums
* Added: `build_stubbed_starting_id=` option to define the starting id for `build_stubbed`
* Removed: deprecated methods on the top-level `FactoryBot` module meant only for internal use
Expand Down

0 comments on commit 710dd7a

Please sign in to comment.