thoughtbot/factory_bot_rails
Factory Bot ♥ Rails observed · 2026-08-28
Health v2 · maintenance only
70/100
- Activity 93
- Release rhythm 22
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 157.5
- age_days: 5945
- days_rel: 362
- days_push: 43
- n_releases_24m: 3
Adoption not part of the score
3137 stars · 376 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
factory_bot_rails provides Rails integration for Factory Bot, a fixtures replacement library for defining test data with a straightforward factory definition syntax. It supports multiple build strategies (saved instances, unsaved instances, attribute hashes, stubbed objects), factory inheritance, automatic factory definition loading, and Rails generators that produce factories instead of fixtures.
Use cases
- replace Rails fixtures with factories in my test suite
- generate test data for Rails models
- create saved and unsaved instances for RSpec tests
- define multiple factories for the same class like user and admin_user
- auto-load factory definitions from spec/factories
- generate factories instead of fixtures with Rails generators
When to choose
- you are building a Rails app and need maintainable, flexible test data setup
- you want fixtures replacement with build strategies and factory inheritance
- you use RSpec, Minitest, or Test::Unit and want automatic factory loading and generator integration
When to avoid
- you are not using Ruby on Rails (use the plain factory_bot gem instead)
- you prefer simple built-in Rails fixtures or a different test data approach
- your project does not have a test suite that needs object factories
Facets
library · maturity stable
testing mocking data-generation testing web-development developer-tools ruby fixtures-replacement test-data factories ruby-gem rails-integration rails
2 sources
- readme: https://github.com/thoughtbot/factory_bot_rails · fetched 2026-08-28 · 0b4c4e9c40a5
- homepage: https://thoughtbot.com/services/ruby-on-rails · fetched 2026-08-29 · a485bc4ffcea
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| thoughtbot/factory_bot_rails | main | 70 |
For agents
markdown · JSON · MCP: product_card(name="thoughtbot/factory_bot_rails")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem