diff options
Diffstat (limited to 'test/net/http/test_http.rb')
-rw-r--r-- | test/net/http/test_http.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 052c3ef558..7d960a7ada 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -96,6 +96,17 @@ class TestNetHTTP < Test::Unit::TestCase end end + def test_proxy_from_env_ENV + clean_http_proxy_env do + ENV['http_proxy'] = 'http://proxy.example:8000' + + assert_equal false, Net::HTTP.proxy_class? + http = Net::HTTP.new 'example' + + assert_equal true, http.proxy_from_env? + end + end + def test_proxy_address_ENV clean_http_proxy_env do ENV['http_proxy'] = 'http://proxy.example:8000' |