Sha256: 2f18ab4c8df5ef96027d397ea9c2ad836b191bb65198c7378c0e88ac55e7a8d6
Contents?: true
Size: 781 Bytes
Versions: 1
Compression:
Stored size: 781 Bytes
Contents
# frozen_string_literal: true require_relative ::File.join('..', 'matchers_base') unless defined?(::Matchi::MatchersBase) module Matchi module Matchers # **Truth** matcher. module BeTrue # The matcher. class Matcher include MatchersBase # Boolean comparison between the actual value and the expected value. # # @example Is it true? # be_true = Matchi::Matchers::BeTrue::Matcher.new # be_true.matches? { true } # => true # # @yieldreturn [#object_id] the actual value to compare to the expected # one. # # @return [Boolean] Comparison between actual and expected values. def matches? true.equal?(yield) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
matchi-1.0.5 | lib/matchi/matchers/be_true.rb |