A summary of data about the Ruby ecosystem.

https://github.com/thoughtbot/factory_bot

A library for setting up Ruby objects as test data.
https://github.com/thoughtbot/factory_bot

Keywords

factories factory-bot factory-girl fixtures rails ruby rubygems testing thoughtbot

Keywords from Contributors

activerecord activejob mvc rspec crash-reporting rubocop sinatra static-code-analysis code-formatter sidekiq

Last synced: about 16 hours ago
JSON representation

Repository metadata

A library for setting up Ruby objects as test data.

README.md

factory_bot

Build Status Code Climate Gem Version

factory_bot is a fixtures replacement with a straightforward definition syntax, support for multiple build strategies (saved instances, unsaved instances, attribute hashes, and stubbed objects), and support for multiple factories for the same class (user, admin_user, and so on), including factory inheritance.

If you want to use factory_bot with Rails, see
factory_bot_rails.

Interested in the history of the project name? You can find the history here

Transitioning from factory_girl? Check out the upgrade guide.

Documentation

See our extensive reference, guides, and cookbook in the factory_bot book.

For information on integrations with third party libraries, such as RSpec or
Rails, see the factory_bot wiki.

We also have a detailed introductory video, available for free on Upcase.

Install

Run:

bundle add factory_bot

To install the gem manually from your shell, run:

gem install factory_bot

Supported Ruby versions

Supported Ruby versions are listed in .github/workflows/build.yml (source)

More Information

Useful Tools

Contributing

Please see CONTRIBUTING.md.

factory_bot was originally written by Joe Ferris and is maintained by thoughtbot.
Many improvements and bugfixes were contributed by the open source
community
.

License

factory_bot is Copyright © 2008 Joe Ferris and thoughtbot. It is free
software, and may be redistributed under the terms specified in the
LICENSE file.

About thoughtbot

thoughtbot

This repo is maintained and funded by thoughtbot, inc.
The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software!
See our other projects.
We are available for hire.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 4 days ago

Total Commits: 1,293
Total Committers: 301
Avg Commits per committer: 4.296
Development Distribution Score (DDS): 0.663

Commits in past year: 56
Committers in past year: 21
Avg Commits per committer in past year: 2.667
Development Distribution Score (DDS) in past year: 0.768

Name Email Commits
Joshua Clayton j****n@t****m 436
Daniel Colson d****n@g****m 138
Joe Ferris j****s@t****m 138
Mike Burns m****s@t****m 22
eugenebolshakov e****v@g****m 17
Gabe Berke-Williams g****e@t****m 15
Yudai Takada t****2@g****m 14
Richie Thomas r****e@t****m 13
Thomas Walpole t****e@g****m 13
CodeMeister b****b@k****m 13
Oliver Peate o****p@g****m 10
Oli Peate o****i@t****m 9
Neil Carvalho me@n****o 9
Valerie Burzynski v****i@t****m 9
Joe Ferris j****s@m****l 8
Alejandro Dustet a****t@g****m 8
Nick Quaranto n****k@q****o 7
Jon Yurek j****k@t****m 6
Ben Orenstein b****n@g****m 6
Dan Croak d****k@t****m 6
Earlopain 1****n 6
Josh Nichols j****h@t****m 6
Matt Jankowski m****i@t****m 6
Simone Carletti w****s@w****t 6
Stefanni Brasil s****l@g****m 6
Kristian Mandrup k****p@g****m 5
Nick Quaranto n****k@t****m 5
Tristan Dunn t****n@g****m 5
Chad Pytel c****l@t****m 5
Sarah Lima s****d@g****m 4
and 271 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 8 days ago

Total issues: 133
Total pull requests: 274
Average time to close issues: 5 months
Average time to close pull requests: 3 months
Total issue authors: 120
Total pull request authors: 80
Average comments per issue: 3.1
Average comments per pull request: 1.19
Merged pull request: 145
Bot issues: 0
Bot pull requests: 37

Past year issues: 17
Past year pull requests: 78
Past year average time to close issues: 8 days
Past year average time to close pull requests: 6 days
Past year issue authors: 17
Past year pull request authors: 18
Past year average comments per issue: 1.53
Past year average comments per pull request: 0.59
Past year merged pull request: 55
Past year bot issues: 0
Past year bot pull requests: 6

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/thoughtbot/factory_bot

Top Issue Authors

  • mike-burns (8)
  • composerinteralia (5)
  • grekko (2)
  • jasonkarns (2)
  • eszancheUez (1)
  • slhck (1)
  • Talha345 (1)
  • mikebaldry (1)
  • frenkel (1)
  • swelther (1)
  • neilvcarvalho (1)
  • smaboshe (1)
  • MarcusRiemer (1)
  • Set27 (1)
  • masarakki (1)

Top Pull Request Authors

  • dependabot[bot] (27)
  • CodeMeister (25)
  • neilvcarvalho (18)
  • ydah (13)
  • sarahraqueld (12)
  • smaboshe (11)
  • vburzynski (10)
  • github-actions[bot] (10)
  • mike-burns (8)
  • Earlopain (8)
  • stefannibrasil (7)
  • composerinteralia (6)
  • seanpdoyle (5)
  • mohammednasser-32 (4)
  • grekko (4)

Top Issue Labels

  • bug (54)
  • feature (46)
  • attached PR (3)
  • documentation (2)
  • pending-response (1)
  • 7.0 Release (1)
  • good first issue (1)
  • stale (1)

Top Pull Request Labels

  • dependencies (27)
  • ruby (24)
  • documentation (6)
  • github_actions (3)
  • bug (2)
  • 7.0 Release (2)
  • open summit (2)

Package metadata

gem.coop: factory_bot

factory_bot provides a framework and DSL for defining and using factories - less error-prone, more explicit, and all-around easier to work with than fixtures.

  • Homepage: https://github.com/thoughtbot/factory_bot
  • Documentation: http://www.rubydoc.info/gems/factory_bot/
  • Licenses: MIT
  • Latest release: 6.5.6 (published about 2 months ago)
  • Last Synced: 2025-12-06T23:01:41.805Z (4 days ago)
  • Versions: 36
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 304,392,419 Total
  • Docker Downloads: 598,607,373
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.058%
    • Downloads: 0.078%
    • Docker downloads count: 0.152%
  • Maintainers (4)
rubygems.org: factory_bot

factory_bot provides a framework and DSL for defining and using factories - less error-prone, more explicit, and all-around easier to work with than fixtures.

  • Homepage: https://github.com/thoughtbot/factory_bot
  • Documentation: http://www.rubydoc.info/gems/factory_bot/
  • Licenses: MIT
  • Latest release: 6.5.6 (published about 2 months ago)
  • Last Synced: 2025-12-06T02:20:49.161Z (5 days ago)
  • Versions: 36
  • Dependent Packages: 520
  • Dependent Repositories: 58,193
  • Downloads: 304,360,593 Total
  • Docker Downloads: 598,607,373
  • Rankings:
    • Downloads: 0.085%
    • Dependent packages count: 0.09%
    • Forks count: 0.11%
    • Average: 0.128%
    • Dependent repos count: 0.145%
    • Stargazers count: 0.147%
    • Docker downloads count: 0.193%
  • Maintainers (4)
proxy.golang.org: github.com/thoughtbot/factory_bot

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/thoughtbot/factory_bot#section-documentation
  • Licenses: mit
  • Latest release: v6.5.6+incompatible (published about 2 months ago)
  • Last Synced: 2025-12-06T02:20:50.700Z (5 days ago)
  • Versions: 87
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Rankings:
    • Forks count: 0.131%
    • Stargazers count: 0.742%
    • Average: 3.53%
    • Dependent repos count: 4.79%
    • Dependent packages count: 8.456%

Dependencies

Gemfile rubygems
  • activerecord-jdbcsqlite3-adapter >= 0
  • sqlite3 >= 0
Gemfile.lock rubygems
  • activemodel 6.1.3
  • activerecord 6.1.3
  • activesupport 6.1.3
  • appraisal 2.3.0
  • aruba 1.0.4
  • ast 2.4.2
  • builder 3.2.4
  • childprocess 4.0.0
  • concurrent-ruby 1.1.8
  • contracts 0.16.0
  • cucumber 5.3.0
  • cucumber-core 8.0.1
  • cucumber-create-meta 2.0.4
  • cucumber-cucumber-expressions 10.3.0
  • cucumber-gherkin 15.0.2
  • cucumber-html-formatter 9.0.0
  • cucumber-messages 13.2.1
  • cucumber-tag-expressions 2.0.4
  • cucumber-wire 4.0.1
  • diff-lcs 1.4.4
  • docile 1.3.5
  • factory_bot 6.2.1
  • ffi 1.14.2
  • i18n 1.8.9
  • middleware 0.1.0
  • minitest 5.14.3
  • multi_test 0.1.2
  • parallel 1.21.0
  • parser 3.1.0.0
  • protobuf-cucumber 3.10.8
  • rainbow 3.1.1
  • rake 13.0.3
  • regexp_parser 2.2.0
  • rexml 3.2.5
  • rspec 3.10.0
  • rspec-core 3.10.1
  • rspec-expectations 3.10.1
  • rspec-its 1.3.0
  • rspec-mocks 3.10.2
  • rspec-support 3.10.2
  • rubocop 1.24.1
  • rubocop-ast 1.15.1
  • rubocop-performance 1.13.1
  • ruby-progressbar 1.11.0
  • simplecov 0.21.2
  • simplecov-html 0.12.3
  • simplecov_json_formatter 0.1.2
  • sqlite3 1.4.2
  • standard 1.6.0
  • sys-uname 1.2.2
  • thor 1.1.0
  • thread_safe 0.3.6
  • tzinfo 2.0.4
  • unicode-display_width 2.1.0
  • yard 0.9.26
  • zeitwerk 2.4.2
factory_bot.gemspec rubygems
  • activerecord >= 0 development
  • appraisal >= 0 development
  • aruba >= 0 development
  • cucumber >= 0 development
  • rake >= 0 development
  • rspec >= 0 development
  • rspec-its >= 0 development
  • simplecov >= 0 development
  • standard >= 0 development
  • yard >= 0 development
  • activesupport >= 5.0.0
.github/workflows/build.yml actions
  • actions/checkout v2 composite
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
.github/workflows/docs.yml actions
  • actions/checkout v3 composite

Score: 36.06010849752033