Class: OSpec::EqualMatcher
Instance Method Summary
collapse
Methods inherited from Matcher
#failure, #initialize
Constructor Details
This class inherits a constructor from OSpec::Matcher
Instance Method Details
#match(expected) ⇒ Object
63
64
65
66
67
|
# File 'lib/ospec/matchers.rb', line 63
def match expected
unless expected.equal? @actual
failure "expected #{@actual.inspect} to be the same as #{expected.inspect}."
end
end
|
#not_match(expected) ⇒ Object
69
70
71
72
73
|
# File 'lib/ospec/matchers.rb', line 69
def not_match expected
if expected.equal? @actual
failure "expected #{@actual.inspect} not to be equal to #{expected.inspect}."
end
end
|