No commit activity in last 3 years
No release in over 3 years
Replaces must/wont methods with should/should_not methods in MiniTest::Spec
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0

Runtime

 Project Readme

minitest/spec/should Build Status

Support for traditional BDD syntax in MiniTest::Spec.

Description

Replaces all must/wont methods with should/should_not methods in MiniTest::Spec.

To quote Dan North in Introducting BDD:

A more subtle aspect of the word should becomes apparent when compared with the more formal alternatives of will or shall. Should implicitly allows you to challenge the premise of the test: “Should it? Really?” This makes it easier to decide whether a test is failing due to a bug you have introduced or simply because your previous assumptions about the system’s behaviour are now incorrect.

Installation

gem install minitest-spec-should

In Gemfile:

gem 'minitest-spec-should'

##Usage

require 'minitest/autorun'
require 'minitest/spec/should'

describe Object do
  it "should respond to should_equal" do
    Object.new.should_respond_to :should_equal
  end

  it "should not respond to must_equal" do
    Object.new.should_not_respond_to :must_equal
  end
end