Class: Matchi::Matchers::BeFalse::Matcher

Inherits:
Object
  • Object
show all
Includes:
Matchi::MatchersBase
Defined in:
lib/matchi/matchers/be_false.rb

Overview

The matcher.

Instance Method Summary collapse

Methods included from Matchi::MatchersBase

#to_h, #to_s

Instance Method Details

#matches?Boolean

Boolean comparison between the actual value and the expected value.

Examples:

Is it false?

be_false = Matchi::Matchers::BeFalse::Matcher.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.



24
25
26
# File 'lib/matchi/matchers/be_false.rb', line 24

def matches?
  false.equal?(yield)
end