зеркало из https://github.com/github/ruby.git
Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4061f5b6fc
Коммит
bd7184b866
|
@ -3,6 +3,7 @@ require 'test/unit'
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
require_relative 'utils'
|
require_relative 'utils'
|
||||||
|
require_relative '../../ruby/envutil'
|
||||||
|
|
||||||
class TestNetHTTP < Test::Unit::TestCase
|
class TestNetHTTP < Test::Unit::TestCase
|
||||||
|
|
||||||
|
@ -291,8 +292,11 @@ module TestNetHTTP_version_1_1_methods
|
||||||
def test_get2
|
def test_get2
|
||||||
start {|http|
|
start {|http|
|
||||||
http.get2('/') {|res|
|
http.get2('/') {|res|
|
||||||
assert_kind_of Net::HTTPResponse, res
|
EnvUtil.suppress_warning do
|
||||||
assert_kind_of Net::HTTPResponse, res.header
|
assert_kind_of Net::HTTPResponse, res
|
||||||
|
assert_kind_of Net::HTTPResponse, res.header
|
||||||
|
end
|
||||||
|
|
||||||
unless self.is_a?(TestNetHTTP_v1_2_chunked)
|
unless self.is_a?(TestNetHTTP_v1_2_chunked)
|
||||||
assert_not_nil res['content-length']
|
assert_not_nil res['content-length']
|
||||||
end
|
end
|
||||||
|
@ -335,9 +339,11 @@ module TestNetHTTP_version_1_1_methods
|
||||||
|
|
||||||
def _test_post__no_data(http)
|
def _test_post__no_data(http)
|
||||||
unless self.is_a?(TestNetHTTP_v1_2_chunked)
|
unless self.is_a?(TestNetHTTP_v1_2_chunked)
|
||||||
data = nil
|
EnvUtil.suppress_warning do
|
||||||
res = http.post('/', data)
|
data = nil
|
||||||
assert_not_equal '411', res.code
|
res = http.post('/', data)
|
||||||
|
assert_not_equal '411', res.code
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче