Class: Ramcrest::Aint::Matcher
- Inherits:
-
Object
- Object
- Ramcrest::Aint::Matcher
show all
- Includes:
- Matcher
- Defined in:
- lib/ramcrest/aint.rb
Instance Method Summary
collapse
Methods included from Matcher
#matches?, #mismatch, #success
Constructor Details
#initialize(expected) ⇒ Matcher
Returns a new instance of Matcher.
13
14
15
|
# File 'lib/ramcrest/aint.rb', line 13
def initialize(expected)
@expected = expected
end
|
Instance Method Details
#description ⇒ Object
25
26
27
|
# File 'lib/ramcrest/aint.rb', line 25
def description
"not #{@expected.description}"
end
|
#do_match(expected, actual) ⇒ Object
17
18
19
|
# File 'lib/ramcrest/aint.rb', line 17
def do_match(expected, actual)
super.negate
end
|
#mismatch_message(actual, match) ⇒ Object
21
22
23
|
# File 'lib/ramcrest/aint.rb', line 21
def mismatch_message(actual, match)
"<#{actual}>"
end
|