Skip to content
CAI
Produce a survey ↗Verify a survey

thoughtbot/factory_bot

This system is the Factory Bot library, a Ruby tool for creating test data in automated tests. It provides a DSL for defining factory templates and supports multiple object creation strategies like build, create, and stub. The codebase has been refactored to improve modularity and maintainability, with a focus on modern Ruby and Rails compatibility.

65.1

Adequate · 2 August 2026

2.6k

lines of production code

Ruby

primary language

3

bus factor · 304 authors in all

3

measurements over time

CAI band scale
CAI trend line

How it got here

2008–2009 · Factory Bot rebranding and project setup

This period focused on the rebranding of the library from 'Factory Girl' to 'Factory Bot', including API updates and configuration changes. The team also established a comprehensive project infrastructure, adding documentation, code style tools, and test configurations to support the new identity and improve test coverage.

7 changes

2010–2017 · Internal architecture refactoring and test coverage

This period was dominated by a comprehensive internal refactoring of FactoryBot's core components, including declarations, strategies, and decorators, to improve modularity and modernize the codebase. The work was heavily supported by the introduction of new public API methods and the addition of extensive test coverage for the restructured internal classes.

15 changes

2018–2026 · Developer tooling and modernization

This period focused on modernizing the project's development workflow and expanding framework compatibility. Key changes included adding a Ruby-based developer console and setup scripts, automating changelog generation for releases, and updating CI to support newer versions of Rails. Additionally, test coverage was improved with new specs and logging utilities.

5 changes

CAI lens gauges

Survey your own repository

thoughtbot/factory_bot was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point the surveyor at a repository you know and see whether you agree with it.

Survey a repository

About this page

  • The description of this project is derived from its own commit history, not from its README.
  • The score is its highest published measurement, taken on 2 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 967d128e37 — the exact code this score is about.
  • Scored under rubric rubric-2026.08.18. Score the same commit under that rubric and you get the same number.
CAI link cards