|
# File test/unit/assertions.rb, line 153
def assert_match(regexp, string, message="")
_wrap_assertion {
assert_instance_of(Regexp, regexp, "The first argument to assert_match should be a Regexp.")
full_message = build_message(message, string, regexp.source) {
| arg1, arg2 |
" <#{arg1}> expected to match regexp\n" +
"</#{arg2}/>"
}
match_data = nil
assert_block(full_message) {
match_data = regexp.match(string)
}
match_data
}
end
|