Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.6k
A library for setting up Ruby objects as test data.
License
thoughtbot/factory_bot
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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, seefactory_bot_rails.
Interested in the history of the project name? You can find the historyhere
Transitioning from factory_girl? Check out theupgrade guide.
See our extensive reference, guides, and cookbook inthe factory_bot book.
For information on integrations with third party libraries, such as RSpec orRails, seethe factory_bot wiki.
We also havea detailed introductory video, available for free on Upcase.
Run:
bundleaddfactory_bot
To install the gem manually from your shell, run:
gem install factory_bot
Supported Ruby versions are listed in.github/workflows/build.yml (source)
- FactoryTrace - helps to find unused factories and traits.
- ruby-lsp-factory_bot /ruby-lsp-rails-factory-bot - integration withruby-lsp to provide intellisense
Please seeCONTRIBUTING.md.
factory_bot was originally written by Joe Ferris and is maintained by thoughtbot.Many improvements and bugfixes were contributed by theopen sourcecommunity.
factory_bot is Copyright © 2008 Joe Ferris and thoughtbot. It is freesoftware, and may be redistributed under the terms specified in theLICENSE file.
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!Seeour other projects.We areavailable for hire.
About
A library for setting up Ruby objects as test data.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.