require 'test/unit'

require 'net/http'
require 'timeout'


class TestNetHttpTimeout < Test::Unit::TestCase
  def test_net_http_timeout
    assert_raises Timeout::Error do
      http = Net::HTTP.new('www.google.de')
      http.open_timeout = 0.01
      response = http.start do |h|
        h.request_get '/index.html'
      end
    end
  end
end

