Factory Bot Versions Save

A library for setting up Ruby objects as test data.

v6.1.0

3 years ago
  • 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

3 years ago

Fixed: bug causing traits to consume more memory each time they were used

v6.0.1

3 years ago

Fixed: bug with constant resolution causing unexpected uninitialized constant errors

v6.0.0

3 years ago
  • 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 for build_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

4 years ago
  • 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

4 years ago
  • Fixed: Ruby 2.7 keyword deprecation warning in FactoryBot.lint

v5.1.1

4 years ago
  • Improved: performance of traits
  • Fixed: registering strategies on JRuby

v5.1.0

4 years ago
  • 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

v5.0.2

5 years ago

Bugfix: raise "Trait not registered" error when passing invalid trait arguments

v5.0.1

5 years ago
  • Bugfix: Do not raise error when two sequences have the same name in two traits that have the same name