The original Ruby library to enforce that specs do not begin with "should"
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Build Status Code Climate Gem Version

You should_not start your specs with the string "should": if every spec begins with "should", then "should" is redundant everywhere and becomes noise. Use this gem to enforce that rule.


Add this line to your application's Gemfile:

gem 'should_not'

And then execute:

$ bundle

Or install it yourself as:

$ gem install should_not



In spec_helper.rb, add the line:

require 'should_not/rspec'

and then specs will fail if the it description starts with should.


Make sure that somewhere you have

require 'should_not/minitest'

and then specs (describe/it syntax only) will fail if the it description starts with should.


Please port this library to your language of choice! Once it's ready, I'll be happy to add your port as a repo under the should-not organization.

If you'd like to contribute to the Ruby version should_not, we could use support for more testing frameworks. Just make sure that you have integration test coverage before you open a pull request.

Related Projects

  • The should_clean gem from @siyelo is a utility that changes 'it "should do something"' to 'it "does something"'
  • BetterSpecs currently recommends not beginning your specs with "should." There is good discussion about this topic at their GitHub issue about not starting with "should."


Available under the terms of the MIT license. See LICENSE.MIT for more details.