Shoulda Matchers
Ruby gem that provides RSpec and Minitest one-liner matchers for testing Rails models, controllers and routes.
matchers.shoulda.iorepositorydocs
Shoulda Matchers adds one-line tests for common Rails functionality, such as models, controllers and routes, to RSpec and Minitest suites. The matchers cover ActiveModel, ActiveRecord and ActionController, and the gem is loaded by test suites, in the test group of a Gemfile.
Apps that are not Rails apps but use ActiveRecord or ActiveModel can use the gem too, by naming the library in a configuration block. The gem is copyrighted by Tammer Saleh and thoughtbot, inc, and the README says thoughtbot, inc maintains and funds the repository.
Sources
- 2026-11-16: links
matchers.shoulda.io/ - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/thoughtbot/shoulda-matchers - 2026-11-16: links
matchers.shoulda.io/docs/ - 2026-11-16: Categories, Runtime, Install with, License model
github.com/thoughtbot/shoulda-matchers/blob/main/README.md - 2026-11-16: Built on, Minimum runtime
raw.githubusercontent.com/thoughtbot/shoulda-matchers/v8.0.1/shoulda-matchers.gemspec - 2026-11-16: License
rubygems.org/api/v1/gems/shoulda-matchers.json - 2026-11-16: Maintainer
raw.githubusercontent.com/thoughtbot/shoulda-matchers/main/LICENSE - 2026-11-16: First release
rubygems.org/api/v1/versions/shoulda-matchers.json - 2026-11-16: Current major version, Last release
api.github.com/repos/thoughtbot/shoulda-matchers/releases - 2026-11-16: Contributors
api.github.com/repos/thoughtbot/shoulda-matchers/contributors?per_page=1 - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/shoulda-matchers