Class: Matchi::BeFalse

Inherits:
BasicObject
Defined in:
lib/matchi/be_false.rb

Overview

Untruth matcher.

Instance Method Summary collapse

Instance Method Details

#matches?Boolean

Returns Comparison between actual and expected values.

Examples:

Is it false?

be_false = Matchi::BeFalse.new
be_false.matches? { false } # => true

Yield Returns:

  • (#object_id)

    the actual value to compare to the expected one.

Returns:

  • (Boolean)

    Comparison between actual and expected values.



11
12
13
# File 'lib/matchi/be_false.rb', line 11

def matches?
  false.equal?(yield)
end