Class | Spec::Matchers::SimpleMatcher |
In: |
lib/spec/matchers/simple_matcher.rb
|
Parent: | Object |
description | [R] |
# File lib/spec/matchers/simple_matcher.rb, line 6 6: def initialize(description, &match_block) 7: @description = description 8: @match_block = match_block 9: end
# File lib/spec/matchers/simple_matcher.rb, line 16 16: def failure_message() 17: return %[expected #{@description.inspect} but got #{@actual.inspect}] 18: end
# File lib/spec/matchers/simple_matcher.rb, line 11 11: def matches?(actual) 12: @actual = actual 13: return @match_block.call(@actual) 14: end