thoughtbot/shoulda-matchers
Simple one-liner tests for common Rails functionality observed · 2026-08-28
Health v2 · maintenance only
86/100
- Activity 97
- Release rhythm 64
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 94.0
- age_days: 5740
- days_rel: 82
- days_push: 23
- n_releases_24m: 5
Adoption not part of the score
3582 stars · 917 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Ruby gem providing RSpec- and Minitest-compatible one-liner matchers for testing common Rails functionality like validations, associations, and controller behavior. It offers 30+ pre-built matchers for ActiveModel, ActiveRecord, ActionController, and routing.
Use cases
- test rails model validations with one-liners
- test activerecord associations in rspec
- write shorter rails unit tests
- test uniqueness validation scoped to a column
- test controller and routing behavior in rails
- add shoulda matchers to minitest suite
When to choose
- you maintain a Rails app with RSpec or Minitest tests
- you want concise, readable tests for validations, associations, and controllers
- you want to reduce boilerplate in your test suite
When to avoid
- you don't use Rails or ActiveModel/ActiveRecord
- you prefer writing explicit, hand-rolled test assertions
- you use a test framework other than RSpec or Minitest
Facets
library · maturity stable
testing e2e-testing testing web-development developer-tools ruby rspec minitest one-liner-tests active-record active-model action-controller rails
3 sources
- readme: https://github.com/thoughtbot/shoulda-matchers · fetched 2026-08-28 · c9356ccc9b17
- homepage: https://matchers.shoulda.io · fetched 2026-08-29 · 3e731a5c4316
- site_page: https://matchers.shoulda.io/docs · fetched 2026-08-29 · ca8433d39e54
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| thoughtbot/shoulda-matchers | main | 86 |
For agents
markdown · JSON · MCP: product_card(name="thoughtbot/shoulda-matchers")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem