Releases: thoughtbot/factory_bot
Releases · thoughtbot/factory_bot
v6.2.1
- Added: CI testing against truffleruby
- Changed: Documentation improvements for sequences and traits
- Fixed: ActiveSupport::Notifications reporting strategy through associations now report as symbols
- Fixed:
add_attribute
with reserved keywords assigns values correctly
v6.2.0
v6.1.0
- Added: public reader for the evaluation instance, helpful for building interrelated associations
- Changed: raise a more helpful error when passing an invalid argument to an association
- Fixed: Ruby 2.7 kwarg deprecation warnings
v6.0.2
Fixed: bug causing traits to consume more memory each time they were used
v6.0.1
Fixed: bug with constant resolution causing unexpected uninitialized constant errors
v6.0.0
- Added: automatic definition of traits for Active Record enum attributes, enabled by default
- Added:
traits_for_enum
method to define traits for non-Active Record enums - Added:
build_stubbed_starting_id=
option to define the starting id forbuild_stubbed
- Removed: deprecated methods on the top-level
FactoryBot
module meant only for internal use - Removed: support for EOL versions of Ruby (2.3, 2.4) and Rails (4.2)
- Removed: support for "abstract" factories with no associated class; use traits instead.
v5.2.0
- Added: Pass index to block for
*_list
methods - Deprecated: top-level methods meant only for internal use:
callbacks
,configuration
,constructor
,initialize_with
,register_sequence
,resent_configuration
,skip_create
,to_create
v5.1.2
- Fixed: Ruby 2.7 keyword deprecation warning in FactoryBot.lint
v5.1.1
- Improved: performance of traits
- Fixed: registering strategies on JRuby
v5.1.0
- Added: "Did you mean?" style error message to help with typos in association declarations
- Changed:
NoMethodError
for static attributes now offers a "Did you mean?" style message - Fixed: avoid undefining inherited evaluator methods
- Fixed: avoid stubbing id for records without a primary key
- Fixed: raise a helpful error for self-referencing traits to avoid a
SystemStackError
- Deprecated: top-level methods meant only for internal use:
allow_class_lookup
,allow_class_lookup
=,register_trait
,trait_by_name
,traits
,sequence_by_name
,sequences
,factory_by_name
,register_factory
,callback_names
,register_callback
,register_default_callbacks
,register_default_strategies
,strategies