[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7668":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":36,"discoverSource":37},7668,"factory_bot","thoughtbot\u002Ffactory_bot","thoughtbot","A library for setting up Ruby objects as test data.","https:\u002F\u002Fthoughtbot.com",null,"Ruby",8177,2557,122,64,0,2,13,41,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,7],"factories","factory-bot","factory-girl","fixtures","rails","ruby","rubygems","testing","2026-06-12 02:01:42","# factory_bot \n\n[![Build Status][ci-image]][ci] [![Gem Version][version-image]][version]\n\nfactory_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.\n\nIf you want to use factory_bot with Rails, see\n[factory_bot_rails](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot_rails).\n\nInterested in the history of the project name? You can find the history [here](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fblob\u002Fmain\u002FNAME.md)\n\nTransitioning from factory\\_girl? Check out the [upgrade guide](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fblob\u002Fv4.9.0\u002FUPGRADE_FROM_FACTORY_GIRL.md).\n\n## Documentation\n\nSee our extensive reference, guides, and cookbook in [the factory_bot book][].\n\nFor information on integrations with third party libraries, such as RSpec or\nRails, see [the factory_bot wiki][].\n\n We also have [a detailed introductory video][], available for free on Upcase.\n\n[a detailed introductory video]: https:\u002F\u002Fupcase.com\u002Fvideos\u002Ffactory-bot?utm_source=github&utm_medium=open-source&utm_campaign=factory-girl\n[the factory_bot book]: https:\u002F\u002Fthoughtbot.github.io\u002Ffactory_bot\n[the factory_bot wiki]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fwiki\n\n## Install\n\nRun:\n\n```ruby\nbundle add factory_bot\n```\n\nTo install the gem manually from your shell, run:\n\n```shell\ngem install factory_bot\n```\n\n## Supported Ruby versions\n\nSupported Ruby versions are listed in `.github\u002Fworkflows\u002Fbuild.yml` ([source](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fblob\u002Fmain\u002F.github\u002Fworkflows\u002Fbuild.yml))\n\n## More Information\n\n* [Rubygems](https:\u002F\u002Frubygems.org\u002Fgems\u002Ffactory_bot)\n* [Stack Overflow](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Ffactory-bot)\n* [Issues](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fissues)\n* [GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS](https:\u002F\u002Frobots.thoughtbot.com\u002F)\n\n[GETTING_STARTED]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fblob\u002Fmain\u002FGETTING_STARTED.md\n\n## Useful Tools\n\n* [FactoryTrace](https:\u002F\u002Fgithub.com\u002Fdjezzzl\u002Ffactory_trace) - helps to find unused factories and traits.\n* [ruby-lsp-factory_bot](https:\u002F\u002Fgithub.com\u002Fdonny741\u002Fruby-lsp-factory_bot) \u002F [ruby-lsp-rails-factory-bot](https:\u002F\u002Fgithub.com\u002Fjohansenja\u002Fruby-lsp-rails-factory-bot) - integration with [ruby-lsp](https:\u002F\u002Fgithub.com\u002FShopify\u002Fruby-lsp) to provide intellisense\n\nContributing\n------------\n\nPlease see [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fblob\u002Fmain\u002FCONTRIBUTING.md).\n\nfactory_bot was originally written by Joe Ferris and is maintained by thoughtbot.\nMany improvements and bugfixes were contributed by the [open source\ncommunity](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fgraphs\u002Fcontributors).\n\nLicense\n-------\n\nfactory_bot is Copyright © 2008 Joe Ferris and thoughtbot. It is free\nsoftware, and may be redistributed under the terms specified in the\n[LICENSE] file.\n\n[LICENSE]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Fblob\u002Fmain\u002FLICENSE\n\n\u003C!-- START \u002Ftemplates\u002Ffooter.md -->\n## About thoughtbot\n\n![thoughtbot](https:\u002F\u002Fthoughtbot.com\u002Fthoughtbot-logo-for-readmes.svg)\n\nThis repo is maintained and funded by thoughtbot, inc.\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\nWe love open source software!\nSee [our other projects][community].\nWe are [available for hire][hire].\n\n[community]: https:\u002F\u002Fthoughtbot.com\u002Fcommunity?utm_source=github\n[hire]: https:\u002F\u002Fthoughtbot.com\u002Fhire-us?utm_source=github\n\n\u003C!-- END \u002Ftemplates\u002Ffooter.md -->\n\n[ci-image]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Factions\u002Fworkflows\u002Fbuild.yml\u002Fbadge.svg?branch=main\n[ci]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Ffactory_bot\u002Factions?query=workflow%3ABuild+branch%3Amain\n[version-image]: https:\u002F\u002Fbadge.fury.io\u002Frb\u002Ffactory_bot.svg\n[version]: https:\u002F\u002Fbadge.fury.io\u002Frb\u002Ffactory_bot\n[hound-badge-image]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FReviewed_by-Hound-8E64B0.svg\n[hound]: https:\u002F\u002Fhoundci.com\n","factory_bot 是一个用于设置 Ruby 对象作为测试数据的库。它提供了一种简洁的定义语法，支持多种构建策略（如保存实例、未保存实例、属性哈希和存根对象），并允许为同一类创建多个工厂（例如用户、管理员用户等），还支持工厂继承。该项目特别适用于需要进行单元测试或集成测试的 Ruby 项目，尤其是在使用 Rails 框架时更为方便。通过 factory_bot，开发者能够更高效地管理测试数据，减少重复代码，提高测试效率。","2026-06-11 03:13:42","top_language"]