def assert_accepts(matcher, target, options = {})
if matcher.respond_to?(:in_context)
matcher.in_context(self)
end
if matcher.matches?(target)
safe_assert_block { true }
if options[:message]
message = matcher.respond_to?(:failure_message_for_should_not) ? matcher.failure_message_for_should_not : matcher.negative_failure_message
assert_match options[:message], message
end
else
message = matcher.respond_to?(:failure_message_for_should) ? matcher.failure_message_for_should : matcher.failure_message
safe_assert_block(message) { false }
end
end