Class: Matchi::Matcher::BeFalse

Inherits:
Base
  • Object
show all
Defined in:
lib/matchi/matcher/be_false.rb

Overview

Untruth matcher.

Instance Attribute Summary

Attributes inherited from Base

#expected

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #to_s, to_sym

Constructor Details

This class inherits a constructor from Matchi::Matcher::Base

Instance Method Details

#matches?Boolean

Boolean comparison between the actual value and the expected value.

Examples:

Is it false?

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



19
20
21
# File 'lib/matchi/matcher/be_false.rb', line 19

def matches?(*, **)
  false.equal?(yield)
end