Factory Bot is great when creating 'presets' of ActiveRecord models. This is all you really need for most simple cases.
At some point however, your models may get too complicated and you may need an actual factory—a class that constructs an object and performs actions along with it.
Factory Bot will then consume a class in this manner:
You can set up a
factory_bot factory to use this by passing a
class option. You'll have to make your factory implement these methods. This is silly and painful.