Sha256: 31d7c3f03db77eb9dcce1dd0cdc49ee5bb3a69e0f72fbc995fe33127ffe620fc

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

module Matchi
  # **Untruth** matcher.
  class BeFalse < BasicObject
    # @example Is it false?
    #   be_false = Matchi::BeFalse.new
    #   be_false.matches? { false } # => true
    #
    # @yieldreturn [#object_id] the actual value to compare to the expected one.
    #
    # @return [Boolean] Comparison between actual and expected values.
    def matches?
      false.equal?(yield)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
matchi-0.0.9 lib/matchi/be_false.rb
matchi-0.0.8 lib/matchi/be_false.rb
matchi-0.0.7 lib/matchi/be_false.rb
matchi-0.0.6 lib/matchi/be_false.rb