diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-05 15:04:46 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-05 15:04:46 +0000 |
commit | bd7184b8661f9d517be007b083f4fb874e6ff186 (patch) | |
tree | 7fa4b616e3f1fd375481d609debed91da7279a7c /test/net/http | |
parent | 4061f5b6fcfe6ad76d7ba7cd4fd6b0274c2d910f (diff) |
Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/http')
-rw-r--r-- | test/net/http/test_http.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 996a453cf1..280d08c321 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -3,6 +3,7 @@ require 'test/unit' require 'net/http' require 'stringio' require_relative 'utils' +require_relative '../../ruby/envutil' class TestNetHTTP < Test::Unit::TestCase @@ -291,8 +292,11 @@ module TestNetHTTP_version_1_1_methods def test_get2 start {|http| http.get2('/') {|res| - assert_kind_of Net::HTTPResponse, res - assert_kind_of Net::HTTPResponse, res.header + EnvUtil.suppress_warning do + assert_kind_of Net::HTTPResponse, res + assert_kind_of Net::HTTPResponse, res.header + end + unless self.is_a?(TestNetHTTP_v1_2_chunked) assert_not_nil res['content-length'] end @@ -335,9 +339,11 @@ module TestNetHTTP_version_1_1_methods def _test_post__no_data(http) unless self.is_a?(TestNetHTTP_v1_2_chunked) - data = nil - res = http.post('/', data) - assert_not_equal '411', res.code + EnvUtil.suppress_warning do + data = nil + res = http.post('/', data) + assert_not_equal '411', res.code + end end end |