Intro
1.
Build strategies
2.
FactoryBot.find_definitions
3.
FactoryBot.define
4.
factory
5.
add_attribute
6.
association
7.
sequence
8.
trait
9.
method_missing
10.
traits_for_enum
11.
skip_create, to_create, and initialize_with
12.
transient
13.
Hooks
14.
FactoryBot.modify
15.
FactoryBot.lint
16.
FactoryBot.register_strategy
17.
Setup
17.1.
Using Without Bundler
17.2.
Rails Preloaders and RSpec
18.
Defining factories
18.1.
Factory name and attributes
18.2.
Specifying the class explicitly
18.3.
Definition file paths
18.4.
Hash attributes
18.5.
Best practices
18.6.
Static Attributes (deprecated)
19.
Using factories
19.1.
Build strategies
19.2.
Building or Creating Multiple Records
19.3.
Attribute overrides
20.
Aliases
21.
Dependent Attributes
22.
Transient Attributes
22.1.
With other attributes
22.2.
With attributes_for
22.3.
With callbacks
22.4.
With associations
23.
Method Name / Reserved Word Attributes
24.
Inheritance
24.1.
Nested factories
24.2.
Assigning parent explicitly
24.3.
Best practices
25.
Associations
25.1.
Implicit definition
25.2.
Explicit definition
25.3.
Inline definition
25.4.
Specifying the factory
25.5.
Overriding attributes
25.6.
Association overrides
25.7.
Build strategies
26.
Sequences
26.1.
Global sequences
26.2.
With dynamic attributes
26.3.
As implicit attributes
26.4.
Inline sequences
26.5.
Initial value
26.6.
Without a block
26.7.
Aliases
26.8.
Rewinding
26.9.
Uniqueness
27.
Traits
27.1.
As implicit attributes
27.2.
Using traits
27.3.
Enum traits
27.4.
Attribute precedence
27.5.
In child factories
27.6.
As mixins
27.7.
With associations
27.8.
Traits within traits
27.9.
With transient attributes
28.
Callbacks
28.1.
Multiple callbacks
28.2.
Global callbacks
28.3.
Symbol#to_proc
29.
Modifying factories
30.
Linting Factories
31.
Custom Construction
32.
Custom Strategies
33.
Custom Callbacks
34.
Custom Methods to Persist Objects
35.
ActiveSupport Instrumentation
36.
has_many associations
37.
has_and_belongs_to_many associations
38.
Polymorphic associations
39.
Interconnected associations
Light
Rust
Coal
Navy
Ayu
factory_bot
Inheritance