should_not

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.

Installation

Add this line to your application's Gemfile:

gem 'should_not'

And then execute:

$ bundle

Or install it yourself as:

$ gem install should_not

Usage

RSpec

In spec_helper.rb, add the line:

require 'should_not/rspec'

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

MiniTest

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.

Contributing

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.

  • 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."

License

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