Class: Ramcrest::Is::Matcher

Inherits:
Object
  • Object
show all
Includes:
Matcher
Defined in:
lib/ramcrest/is.rb

Instance Method Summary collapse

Methods included from Matcher

#do_match, #matches?, #mismatch, #success

Constructor Details

#initialize(expected, was_originally_matcher) ⇒ Matcher

Returns a new instance of Matcher.



19
20
21
22
# File 'lib/ramcrest/is.rb', line 19

def initialize(expected, was_originally_matcher)
  @expected = expected
  @was_originally_matcher = was_originally_matcher
end

Instance Method Details

#descriptionObject



28
29
30
# File 'lib/ramcrest/is.rb', line 28

def description
  "is #{show @expected.description}"
end

#mismatch_message(actual, match) ⇒ Object



24
25
26
# File 'lib/ramcrest/is.rb', line 24

def mismatch_message(actual, match)
  "was #{show match.description}"
end