lib/matchi/fix.rb
def matches?(&block)
      expected.against(log_level: 0, &block)
    rescue ::SystemExit => e
      e.success?
    end
# Boolean comparison between an actual value and the expected specs.
#
# @example With a block of specifications
#   require "matchi/fix"
#
#   matcher = Matchi::Fix.new { it MUST be 42 }
#
#   matcher.expected        # => #<Fix::Set:0x00007fd96915dc28 ...>
#   matcher.matches? { 42 } # => true
#
# @example With the constant name of the specifications
#   require "matchi/fix"
#
#   Fix :Answer do
#     it MUST be 42
#   end
#
#   matcher = Matchi::Fix.new(:Answer)
#
#   matcher.expected        # => #<Fix::Set:0x00007fd96915dc28 ...>
#   matcher.matches? { 42 } # => true
#
# @yieldreturn [#object_id] The value to be compared to the specifications.
#
# @return [Boolean] Determines whether the test has passed or failed.
Boolean comparison between an actual value and the expected specs.
Boolean comparison between an actual value and the expected specs .
def matches?(&block)
      expected.against(log_level: 0, &block)
    rescue ::SystemExit => e
      e.success?
    end
def matches? ( & block ) expected . against ( log_level : 0 , & block ) rescue :: SystemExit => e e . success? end
Boolean comparison between an actual value and the expected specs.
Boolean comparison between an actual value and the expected specs .
The value to be compared to the specifications.
The value to be compared to the specifications .
#object_id
Determines whether the test has passed or failed.
Determines whether the test has passed or failed .
Boolean
block
example
With a block of specifications require "matchi/fix" matcher = Matchi::Fix.new { it MUST be 42 } matcher.expected # => # matcher.matches.
With a block of specifications require " matchi / fix " matcher = Matchi :: Fix . new { it MUST be 42 } matcher . expected # = > # matcher . matches .
example
With the constant name of the specifications require "matchi/fix" Fix :Answer do it MUST be 42 end matcher = Matchi::Fix.new(:Answer) matcher.expected # => # matcher.matches.
With the constant name of the specifications require " matchi / fix " Fix : Answer do it MUST be 42 end matcher = Matchi :: Fix . new ( : Answer ) matcher . expected # = > # matcher . matches .