assert_throws (MiniTest::Assertions)

    # File lib/minitest/unit.rb, line 173
        def assert_throws sym, msg = nil
          default = "Expected #{mu_pp(sym)} to have been thrown"
          caught = true
          catch(sym) do
            begin
              yield
            rescue ArgumentError => e     # 1.9 exception
              default += ", not #{e.message.split(/ /).last}"
            rescue NameError => e         # 1.8 exception
              default += ", not #{e.name.inspect}"
            end
            caught = false
          end

          assert caught, message(msg) { default }
        end