class RSpec::Matchers::DSL::Matcher
def match_unless_raises(exception=Exception, &block)
end
end
validator.validate(candidate_address)
match_unless_raises ValidationException do |validator|
RSpec::Matchers.define :accept_as_valid do |candidate_address|
@example
rather than returning false to indicate a failure.
Use this instead of `match` when the block will raise an exception
def match_unless_raises(exception=Exception, &block) @expected_exception = exception match(&block) end