Module: Ramcrest::Assertion
- Defined in:
- lib/ramcrest/assertion.rb
Class Method Summary collapse
Class Method Details
.assert_match(actual, matcher, &failure_handler) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/ramcrest/assertion.rb', line 3 def self.assert_match(actual, matcher, &failure_handler) match = matcher.matches?(actual) if not match.matched? failure_handler.call("expected: #{matcher.description}\nbut: #{match.description}") end end |