Project

should_not

0.03
No commit activity in last 3 years
No release in over 3 years
You should_not start your specs with the string "should". If every spec starts with "should", then it's redundant everywhere. Instead, write in an active tone: `it "should ignore nil elements"` - BAD `it "ignores nil elements"` - GOOD
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 5.0
>= 0
~> 3.0
 Project Readme

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.

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

License

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