module MiniTest::Assertions

def assert_raises *exp

def assert_raises *exp
  msg = String === exp.last ? exp.pop : nil
  should_raise = false
  begin
    yield
    should_raise = true
  rescue Exception => e
    assert_includes(exp, e.class, exception_details(e, "<#{mu_pp(exp)}> exception expected, not"))
    return e
  end
  exp = exp.first if exp.size == 1
  flunk "#{mu_pp(exp)} expected but nothing was raised." if should_raise
end