class EqlMatcher

Public Class Methods

new(expected) click to toggle source
# File lib/mspec/matchers/eql.rb, line 2
def initialize(expected)
  @expected = expected
end

Public Instance Methods

failure_message() click to toggle source
# File lib/mspec/matchers/eql.rb, line 11
def failure_message
  ["Expected #{@actual.pretty_inspect}",
   "to have same value and type as #{@expected.pretty_inspect}"]
end
matches?(actual) click to toggle source
# File lib/mspec/matchers/eql.rb, line 6
def matches?(actual)
  @actual = actual
  @actual.eql?(@expected)
end
negative_failure_message() click to toggle source
# File lib/mspec/matchers/eql.rb, line 16
def negative_failure_message
  ["Expected #{@actual.pretty_inspect}",
   "not to have same value or type as #{@expected.pretty_inspect}"]
end