summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-05 15:04:46 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-05 15:04:46 +0000
commitbd7184b8661f9d517be007b083f4fb874e6ff186 (patch)
tree7fa4b616e3f1fd375481d609debed91da7279a7c /test
parent4061f5b6fcfe6ad76d7ba7cd4fd6b0274c2d910f (diff)
Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/net/http/test_http.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 996a453..280d08c 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