# factory_bot

Ruby library for defining factories that build test data objects, a replacement for fixtures.


Source: https://findsoftware.frbit.cloud/factory-bot/
Last reviewed: 2026-11-08
Listed since: 2026-11-08

## Record

### Links

- home: https://thoughtbot.github.io/factory_bot/
- repository: https://github.com/thoughtbot/factory_bot
- docs: https://thoughtbot.github.io/factory_bot/

### Identity

- status: active
- maintainer: thoughtbot, inc.
- maintainerType: unknown
- parent: unknown
- firstRelease: 2008
- hqCountry: unknown

### Kind

- category: testing
- hosting: not applicable
- language: ruby
- runtime: ruby
- runtimeMin: ruby 3.0
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: unknown
- renderingModes: not applicable
- installMethod: gem install

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 6
- latestReleaseDate: 2026-05-04

### Adoption

- githubStargazers: 8166
- packagistDownloads: not applicable
- npmWeeklyDownloads: not applicable
- contributors: 261
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 58193
- dependentPackages: 520

### Sources

- urls: https://thoughtbot.github.io/factory_bot/ (read 2026-11-08)
- urls: https://thoughtbot.github.io/factory_bot/ (read 2026-11-08)
- urls: https://api.github.com/repos/thoughtbot/factory_bot (read 2026-11-08)
- maintainer: https://github.com/thoughtbot/factory_bot/blob/main/LICENSE (read 2026-11-08)
- firstRelease: https://api.github.com/repos/thoughtbot/factory_bot/commits/0a6a54c6b95112e0bc5a691d9e1ef2a684a3cec5 (read 2026-11-08)
- category: https://api.github.com/repos/thoughtbot/factory_bot (read 2026-11-08)
- language: https://api.github.com/repos/thoughtbot/factory_bot (read 2026-11-08)
- runtime: https://github.com/thoughtbot/factory_bot/blob/main/README.md (read 2026-11-08)
- runtimeMin: https://github.com/thoughtbot/factory_bot/blob/v6.6.0/factory_bot.gemspec (read 2026-11-08)
- installMethod: https://github.com/thoughtbot/factory_bot/blob/main/README.md (read 2026-11-08)
- license: https://api.github.com/repos/thoughtbot/factory_bot (read 2026-11-08)
- currentMajor: https://api.github.com/repos/thoughtbot/factory_bot/releases/latest (read 2026-11-08)
- latestReleaseDate: https://api.github.com/repos/thoughtbot/factory_bot/releases/latest (read 2026-11-08)
- githubStargazers: https://api.github.com/repos/thoughtbot/factory_bot (read 2026-11-08)
- contributors: https://api.github.com/repos/thoughtbot/factory_bot/contributors?per_page=1 (read 2026-11-08)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/factory_bot (read 2026-11-08)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/factory_bot (read 2026-11-08)

## Notes

factory_bot is a Ruby library for defining factories, which build test objects from one definition with several build strategies: saved, unsaved, attribute hashes and stubs. It is installed as a gem, and its reference is a book published on GitHub Pages. Rails and RSpec are supported through separate integrations that the README points to.

## Worth knowing

The getting-started guide in the repository is marked deprecated.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
