thoughtbot / factory_bot

A library for setting up Ruby objects as test data.
https://thoughtbot.com
MIT License
7.89k stars 2.6k forks source link

Move stub strategy into factory_bot_rails #1643

Open mike-burns opened 2 months ago

mike-burns commented 2 months ago

The stub strategy is specific to ActiveRecord. It exists to create a stub of ActiveRecord model instances. Therefore, it should live in factory_bot_rails.

My hope is that by doing this we'll need to refactor some code and add some hooks. This could allow for better hooks for adding strategies, meaning people could make more of their own.