# thoughtbot/shoulda

Makes tests easy on the fingers and the eyes

Repository: https://github.com/thoughtbot/shoulda
Canonical: https://ross.abutalabs.com/products/shoulda
Homepage: http://www.thoughtbot.com/community
Language: Ruby
License: MIT
License Family: permissive
Last push: 2025-05-23T15:40:13+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 23, release rhythm 35, longevity 100
- inputs: {"age_days": 6715, "days_push": 467, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2204, forks 182 (observed 2026-08-28T04:06:25.797766+00:00)

## What it is
Shoulda is an umbrella Ruby gem that makes Rails tests easier to write and read by bundling Shoulda Context and Shoulda Matchers. It provides expressive one-liner matchers for validations, associations, and controller behavior under Minitest, Test::Unit, and RSpec.

## Use cases
- write concise Rails model validation tests
- test ActiveRecord associations with one-liners
- group tests into readable contexts
- test controller behavior in Rails apps
- make Minitest tests more expressive
- add one-liner matchers to RSpec suites

## When to choose
- you write Rails tests with Minitest, Test::Unit, or RSpec and want readable one-liner matchers
- you want to reduce boilerplate in model and controller specs

## When to avoid
- you are not testing a Rails application
- you use a test framework outside Minitest, Test::Unit, or RSpec
- you need testing tools for non-Ruby projects

## Facets
- artifact type: library
- maturity: stable
- function: testing
- domain: testing, web-development, developer-tools
- platform: ruby
- tags: rails, minitest, rspec, test-unit, matchers, umbrella-gem

## Member repositories
- thoughtbot/shoulda (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:25.797766+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:46:44.724010+00:00, confidence not recorded.
  - readme: https://github.com/thoughtbot/shoulda (fetched 2026-08-28T04:06:25.797766+00:00, sha 2b2a22bfb72f)
  - homepage: http://www.thoughtbot.com/community (fetched 2026-08-29T10:27:02.530886+00:00, sha 69c4157c129c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
