should_not

1.1.0last stable release 10 years ago
Complexity Score
Low
Open Issues
N/A
Dependent Projects
13
Weekly Downloadsglobal
21

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

should_not

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.

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
No Data
Test Coverage
No Data
Follows Semver
Yes
Github Stars
35
Dependenciestotal
4
DependenciesOutdated
1
DependenciesDeprecated
0
Threat Modelling
No Data
Repo Audits
No Data

Learn how to distribute should_not in your own private RubyGems registry

gem install should_not
Processing...
Done

4 Releases

RubyGems on Cloudsmith

Getting started with RubyGems on Cloudsmith is fast and easy.