Module: MiniTest

Defined in:
lib/minitest-shouldify.rb,
lib/minitest/shouldify.rb

Defined Under Namespace

Modules: Shouldify Classes: Unit

Class Method Summary collapse

Class Method Details

.shouldify!(new_must, new_wont) ⇒ Object

Registers new expectations names.

Example:

MiniTest.shouldify! "should", "should_not"

class Foo
  def bar; "bar"; end
end

describe Foo, :bar do
  it "is bar" do
    Foo.new.bar.should_equal "bar"
  end

  it "is not baz" do
    Foo.new.bar.should_not_equal "baz"
  end
end


151
152
153
# File 'lib/minitest/shouldify.rb', line 151

def self.shouldify! new_must, new_wont
  MiniTest::Shouldify.register! new_must, new_wont
end