module RSpec::Matchers::DSL::Macros

def match_unless_raises(expected_exception=Exception, &match_block)

Other tags:
    Yield: - actual the actual object (i.e. the value wrapped by `expect`)
def match_unless_raises(expected_exception=Exception, &match_block)
  define_user_override(:matches?, match_block) do |actual|
    @actual = actual
    begin
      super(*actual_arg_for(match_block))
    rescue expected_exception => @rescued_exception
      false
    else
      true
    end
  end
end