4 attr_reader :description
6 def initialize(description, &match_block)
7 @description = description
8 @match_block = match_block
13 return @match_block.call(@actual)
17 return %[expected #{@description.inspect} but got #{@actual.inspect}]
20 def negative_failure_message()
21 return %[expected not to get #{@description.inspect}, but got #{@actual.inspect}]
25 def simple_matcher(message, &match_block)
26 SimpleMatcher.new(message, &match_block)