mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_http.rb: clear environment variables
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address): clear environment variables. If http_proxy environment variable was set, the test failed. * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d0df0547c6
commit
e453cc71a8
2 changed files with 23 additions and 11 deletions
|
@ -1,3 +1,11 @@
|
|||
Sat Sep 29 19:41:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
||||
|
||||
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
|
||||
clear environment variables. If http_proxy environment variable was
|
||||
set, the test failed.
|
||||
|
||||
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.
|
||||
|
||||
Sat Sep 29 19:41:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
||||
|
||||
* test/drb/drbtest.rb (DRbCore#teardown):
|
||||
|
|
|
@ -88,12 +88,14 @@ class TestNetHTTP < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_proxy_address
|
||||
clean_http_proxy_env do
|
||||
http = Net::HTTP.new 'example', nil, 'proxy.example'
|
||||
assert_equal 'proxy.example', http.proxy_address
|
||||
|
||||
http = Net::HTTP.new 'example', nil
|
||||
assert_equal nil, http.proxy_address
|
||||
end
|
||||
end
|
||||
|
||||
def test_proxy_address_ENV
|
||||
clean_http_proxy_env do
|
||||
|
@ -137,6 +139,7 @@ class TestNetHTTP < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_proxy_port
|
||||
clean_http_proxy_env do
|
||||
http = Net::HTTP.new 'exmaple', nil, 'proxy.example'
|
||||
assert_equal 'proxy.example', http.proxy_address
|
||||
assert_equal 80, http.proxy_port
|
||||
|
@ -145,6 +148,7 @@ class TestNetHTTP < Test::Unit::TestCase
|
|||
http = Net::HTTP.new 'exmaple', nil
|
||||
assert_equal nil, http.proxy_port
|
||||
end
|
||||
end
|
||||
|
||||
def test_proxy_port_ENV
|
||||
clean_http_proxy_env do
|
||||
|
|
Loading…
Reference in a new issue