factory_bot

A library for setting up Ruby objects as test data.

MIT License

Downloads
236.9M
Stars
7.9K
Committers
282

Bot releases are hidden (Show)

factory_bot - 6.4.6 Latest Release

Published by mike-burns 9 months ago

  • Fix: Bump minimum required Ruby in gemspec (Earlopain).
  • Fix: Broken link in FactoryBot.modify docs (Matt Brictson).
  • Fix: Broken link in FactoryBot.lint docs (Anton Dieterle).
factory_bot - 6.4.5

Published by mike-burns 10 months ago

  • Changed: Support Ruby 3.0+, Rails 6.1+ (Mike Burns).
factory_bot - 6.4.4

Published by mike-burns 10 months ago

  • Internal: Remove observer dependency (Earlopain).
factory_bot - 6.4.3

Published by mike-burns 10 months ago

  • Fix: Support models without ID setters in build_stubbed (Olivier Bellone).
  • Fix: Explicit observer dependency (Oleg Antonyan).
  • Internal: Add Rails 7.1 to CI (Olivier Bellone).
  • Internal: Bump github actions/checkout to v4 (Lorenzo Zabot)
  • Internal: Stop passing disable-error_highlight in CI (Mike Burns).
  • Internal: Relax the exception message check (Mike Burns).
factory_bot - 6.4.2

Published by mike-burns 11 months ago

  • Fix: top-level traits pass their class to ActiveSupport::Notifications (makicamel).
factory_bot - 6.4.1

Published by mike-burns 11 months ago

  • Fix: factories with traits pass their class to ActiveSupport::Notifications
    (makicamel).
factory_bot - Version 6.4.0

Published by mike-burns 11 months ago

  • Added: if build_stubbed detects a UUID primary key, generate the correct type (Peter Boling, Alexandre Ruban).
  • Docs: show examples of Ruby 3 syntactic sugars (Sean Doyle).
  • Internal: resolve test warning messages (Mike Burns).
factory_bot - v6.3.0

Published by mike-burns about 1 year ago

  • Fix: link to changelog for RubyGems (Berkan Ünal).
  • Fix: integrate with Ruby 3.2's did_you_mean library (Daniel Colson).
  • Changed: explicitly define #destroyed? within the Stub strategy to return false to be consistent
    with ActiveRecord (Benjamin Fleischer).
  • Added: announce factory_bot.compile_factory notification (Sean Doyle).
  • Docs: clarify that custom strategies need to define #to_sym (Edmund Korley, Jonas S).
  • Docs: fix CI link in README (Mark Huk).
  • Docs: fix GitHub links (Robert Fletcher).
  • Docs: install this library with bundle add (Glauco Custódio).
  • Docs: re-write into mdBook (Mike Burns, Sara Jackson, Stefanni Brasil)
  • Docs: clarify that automatic trait definitions could introduce new linting errors (Lawrence Chou).
  • Internal: skip TruffleRuby on Rails 5.0, 5.1, 5.2 (Andrii Konchyn).
  • Internal: fix typoes throughout codebase (Yudai Takada).
  • Internal: run CI on actions/checkout v3 (Yudai Takada).
  • Internal: follow standardrb code style (Yudai Takada).
  • Internal: stop using Hound (Daniel Nolan).
  • Internal: only run simplecov on C Ruby (Daniel Colson).
  • Internal: quieter Cucumber (Daniel Colson).
  • Internal: Ruby 3.2 support (Daniel Colson).
  • Internal: Mike Burns is the CODEOWNER (Stefanni Brasil).

New Contributors

Full diff: https://github.com/thoughtbot/factory_bot/compare/v6.2.1...v6.3.0

factory_bot -

Published by joshuaclayton over 2 years ago

  • 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
factory_bot -

Published by composerinteralia over 3 years ago

  • Added: support for Ruby 3.0
  • Changed: Include factory or trait name in error messages for missing traits. d05a9a3c
  • Changed: Switched from Travis CI to GitHub Actions
  • Fixed: More Ruby 2.7 kwarg deprecation warnings
factory_bot -

Published by composerinteralia over 4 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
factory_bot -

Published by composerinteralia over 4 years ago

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

factory_bot -

Published by composerinteralia over 4 years ago

Fixed: bug with constant resolution causing unexpected uninitialized constant errors

factory_bot -

Published by composerinteralia over 4 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.
factory_bot -

Published by composerinteralia over 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
factory_bot -

Published by composerinteralia over 4 years ago

  • Fixed: Ruby 2.7 keyword deprecation warning in FactoryBot.lint
factory_bot -

Published by composerinteralia about 5 years ago

  • Improved: performance of traits
  • Fixed: registering strategies on JRuby
factory_bot -

Published by composerinteralia about 5 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
factory_bot - v5.0.2

Published by composerinteralia over 5 years ago

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

factory_bot - v5.0.1

Published by hellosweta over 5 years ago

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