class DictKeyMatcher defm match(expected, actual) return has_key(actual, expected) end defm failure_message_for_match(expected, actual) return "expected dict to have key #{actual}" end defm failure_message_for_mismatch(expected, actual) return "expected dict to not have key #{actual}" end end