[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8014":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":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":25,"discoverSource":26},8014,"shoulda","thoughtbot\u002Fshoulda","thoughtbot","Makes tests easy on the fingers and the eyes","http:\u002F\u002Fwww.thoughtbot.com\u002Fcommunity",null,"Ruby",2205,183,54,2,0,28.79,"MIT License",false,"main",[],"2026-06-12 02:01:47","# Shoulda [![Gem Version][version-badge]][rubygems] [![Build Status][github-actions-badge]][github-actions] [![Total Downloads][downloads-total]][rubygems] [![Downloads][downloads-badge]][rubygems]\n\n[version-badge]: https:\u002F\u002Fimg.shields.io\u002Fgem\u002Fv\u002Fshoulda.svg\n[rubygems]: https:\u002F\u002Frubygems.org\u002Fgems\u002Fshoulda\n[github-actions-badge]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fthoughtbot\u002Fshoulda\u002Fci.yml?branch=main\n[github-actions]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Fshoulda\u002Factions\n[downloads-total]: https:\u002F\u002Fimg.shields.io\u002Fgem\u002Fdt\u002Fshoulda.svg\n[downloads-badge]: https:\u002F\u002Fimg.shields.io\u002Fgem\u002Fdtv\u002Fshoulda.svg\n[downloads-badge]: https:\u002F\u002Fimg.shields.io\u002Fgem\u002Fdtv\u002Fshoulda.svg\n\nShoulda helps you write more understandable, maintainable Rails-specific tests\nunder Minitest and Test::Unit.\n\n## Quick links\n\n📢 **[See what's changed in recent versions.][changelog]**\n\n[changelog]: CHANGELOG.md\n\n## Overview\n\nAs an umbrella gem, the `shoulda` gem doesn't contain any code of its own but\nrather brings in behavior from two other gems:\n\n* [Shoulda Context]\n* [Shoulda Matchers]\n\n[Shoulda Context]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Fshoulda-context\n[Shoulda Matchers]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Fshoulda-matchers\n\nFor instance:\n\n```ruby\nrequire \"test_helper\"\n\nclass UserTest \u003C ActiveSupport::TestCase\n  context \"associations\" do\n    should have_many(:posts)\n  end\n\n  context \"validations\" do\n    should validate_presence_of(:email)\n    should allow_value(\"user@example.com\").for(:email)\n    should_not allow_value(\"not-an-email\").for(:email)\n  end\n\n  context \"#name\" do\n    should \"consist of first and last name\" do\n      user = User.new(first_name: \"John\", last_name: \"Smith\")\n      assert_equal \"John Smith\", user.name\n    end\n  end\nend\n```\n\nHere, the `context` and `should` methods come from Shoulda Context; matchers\n(e.g. `have_many`, `allow_value`) come from Shoulda Matchers.\n\nSee the READMEs for these projects for more information.\n\n## Compatibility\n\nShoulda is tested and supported against Ruby 3.0+, Rails 6.1+, RSpec 3.x,\nMinitest 4.x, and Test::Unit 3.x.\n\n- For Ruby \u003C 3 and Rails \u003C 6.1 compatibility, please use [v4.0.0][v4.0.0].\n\n[v4.0.0]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Fshoulda-matchers\u002Ftree\u002Fv4.0.0\n\n## Versioning\n\nShoulda follows Semantic Versioning 2.0 as defined at \u003Chttp:\u002F\u002Fsemver.org>.\n\n## Team\n\nShoulda is currently maintained by [Pedro Paiva][VSPPedro]. Previous maintainers\ninclude [Elliot Winkler][mcmire], [Jason Draper][drapergeek], [Gabe\nBerke-Williams][gabebw], [Ryan McGeary][rmm5t], [Joe Ferris][jferris], [Dan\nCroaky][croaky], and [Tammer Saleh][tammersaleh].\n\n[VSPPedro]: https:\u002F\u002Fgithub.com\u002FVSPPedro\n[mcmire]: https:\u002F\u002Fgithub.com\u002Fmcmire\n[drapergeek]: https:\u002F\u002Fgithub.com\u002Fdrapergeek\n[gabebw]: https:\u002F\u002Fgithub.com\u002Fgabebw\n[rmm5t]: https:\u002F\u002Fgithub.com\u002Frmm5t\n[jferris]: https:\u002F\u002Fgithub.com\u002Fjferris\n[croaky]: https:\u002F\u002Fgithub.com\u002Fcroaky\n[tammersaleh]: https:\u002F\u002Fgithub.com\u002Ftammersaleh\n\n## Copyright\u002FLicense\n\nShoulda is copyright © Tammer Saleh and [thoughtbot,\ninc][thoughtbot-website]. It is free and opensource software and may be\nredistributed under the terms specified in the [LICENSE](LICENSE) file.\n\n[thoughtbot-website]: https:\u002F\u002Fthoughtbot.com\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\n\u003C!-- END \u002Ftemplates\u002Ffooter.md -->\n","Shoulda 是一个旨在简化 Rails 测试编写的 Ruby 库，它通过提供更易读、更易维护的测试代码来提升开发体验。该项目集成了 Shoulda Context 和 Shoulda Matchers 两个子库的功能，前者提供了上下文式的测试组织方式，后者则丰富了断言方法，比如验证模型关联和属性有效性等。Shoulda 支持包括 Minitest 和 Test::Unit 在内的多种测试框架，并且兼容 Ruby 3.0+ 和 Rails 6.1+ 等版本。对于需要编写清晰结构化测试用例的 Ruby on Rails 开发者来说，Shoulda 是一个非常实用的选择，特别是在项目规模较大或团队协作时，能够显著提高测试代码的可读性和维护性。","2026-06-11 03:15:38","top_language"]