thoughtbot / thoughtbot/factory_bot
Move stub strategy into factory_bot_rails
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.2k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing stub strategy and its ActiveRecord model-instance integration, then compare the responsibilities of factory_bot and factory_bot_rails. Done means the strategy lives in factory_bot_rails and the refactor establishes the requested hooks for adding strategies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100