module Minitest::Spec::DSL::InstanceMethods
Rdoc… why are you so dumb?
Public Instance Methods
Source
# File lib/minitest/spec.rb, line 313 def _ value = nil, &block Minitest::Expectation.new block || value, self end
Takes a value or a block and returns a value monad that has all of Minitest::Expectations methods available to it.
_(1 + 1).must_equal 2
And for blocks:
_ { 1 + "1" }.must_raise TypeError
It is also aliased to value and expect for your aesthetic pleasure:
_(1 + 1).must_equal 2 value(1 + 1).must_equal 2 expect(1 + 1).must_equal 2