Module: Minitest::ShouldJustWork

Defined in:
lib/minitest/should_just_work.rb,
lib/minitest/should_just_work/version.rb,
sig/minitest/should_just_work.rbs

Overview

Rspec-like operator assertions for Minitest.

Usage

obj.should == 2
obj.should != 3
obj.should == nil      # asserts nil, not equality with nil
obj.should =~ /regex/
obj.should > 1

# Negate with should_not, or with .not:
obj.should_not == 3
obj.should.not == 3

# Errors and throws:
should.raise(ArgumentError) { boom }
should_not.throw(:x) { quiet }

# Messages:
otherwise "Age must be set properly"
age.should == 18

Defined Under Namespace

Modules: TestHelpers Classes: Error, Should

Constant Summary collapse

VERSION =

Returns:

  • (String)
"1.0.0"