Makes tests easy on the fingers and the eyes
Alternatives To Shoulda
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Shoulda2,16316,3663,5142 months ago33June 13, 20201mitRuby
Makes tests easy on the fingers and the eyes
Json_matchers3585722 years ago16July 19, 201915mitRuby
Validate your JSON APIs
Shoulda Context1818,2802572 months ago19June 13, 20203mitRuby
Shoulda Context makes it easy to write understandable and maintainable tests under Minitest and Test::Unit within Rails projects or plain Ruby projects.
Alternatives To Shoulda
Select To Compare

Alternative Project Comparisons

Shoulda Gem Version Build Status Downloads Hound

Shoulda helps you write more understandable, maintainable Rails-specific tests under Minitest and Test::Unit.

Quick links

📢 See what's changed in recent versions.


As an umbrella gem, the shoulda gem doesn't contain any code of its own but rather brings in behavior from two other gems:

For instance:

require "test_helper"

class UserTest < ActiveSupport::TestCase
  context "associations" do
    should have_many(:posts)

  context "validations" do
    should validate_presence_of(:email)
    should allow_value("[email protected]").for(:email)
    should_not allow_value("not-an-email").for(:email)

  context "#name" do
    should "consist of first and last name" do
      user = "John", last_name: "Smith")
      assert_equal "John Smith",

Here, the context and should methods come from Shoulda Context; matchers (e.g. have_many, allow_value) come from Shoulda Matchers.

See the READMEs for these projects for more information.


Shoulda is tested and supported against Ruby 2.4+, Rails 4.2+, RSpec 3.x, Minitest 4.x, and Test::Unit 3.x.


Shoulda follows Semantic Versioning 2.0 as defined at


Shoulda is maintained by Elliot Winkler. It was previously maintained by Travis Jeffery.


Shoulda is copyright © 2006-2020 Tammer Saleh and thoughtbot, inc. It is free and opensource software and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot


The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We are passionate about open source software. See our other projects. We are available for hire.

Popular Minitest Projects
Popular Thoughtbot Projects
Popular Software Quality Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.