Sha256: e74b1d435aff6f1769529429eef5815cd884d241cf352d6f4ddc5d8c0ee7ad9e
Contents?: true
Size: 948 Bytes
Versions: 45
Compression:
Stored size: 948 Bytes
Contents
module Micronaut module Matchers # :call-seq: # should equal(expected) # should_not equal(expected) # # Passes if given and expected are the same object (object identity). # # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby. # # == Examples # # 5.should equal(5) #Fixnums are equal # "5".should_not equal("5") #Strings that look the same are not the same object def equal(expected) simple_matcher do |actual, matcher| matcher.failure_message = "expected #{expected.inspect}, got #{actual.inspect} (using .equal?)", expected, actual matcher.negative_failure_message = "expected #{actual.inspect} not to equal #{expected.inspect} (using .equal?)", expected, actual matcher.description = "equal #{expected.inspect}" actual.equal?(expected) end end end end
Version data entries
45 entries across 45 versions & 3 rubygems