summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/test_http.rb22
-rw-r--r--test/net/http/test_http_request.rb20
-rw-r--r--test/net/http/test_httpresponse.rb2
3 files changed, 22 insertions, 22 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index f1d3ede53e..493823549a 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -14,7 +14,7 @@ class TestNetHTTP < Test::Unit::TestCase
proxy_class = Net::HTTP.Proxy 'proxy.example', 8000, 'user', 'pass'
- refute_equal Net::HTTP, proxy_class
+ assert_not_equal Net::HTTP, proxy_class
assert_operator proxy_class, :<, Net::HTTP
@@ -25,7 +25,7 @@ class TestNetHTTP < Test::Unit::TestCase
http = proxy_class.new 'hostname.example'
- refute http.proxy_from_env?
+ assert_not_predicate http, :proxy_from_env?
proxy_class = Net::HTTP.Proxy 'proxy.example'
@@ -43,7 +43,7 @@ class TestNetHTTP < Test::Unit::TestCase
proxy_class = Net::HTTP.Proxy :ENV
- refute_equal Net::HTTP, proxy_class
+ assert_not_equal Net::HTTP, proxy_class
assert_operator proxy_class, :<, Net::HTTP
@@ -51,7 +51,7 @@ class TestNetHTTP < Test::Unit::TestCase
assert_nil proxy_class.proxy_user
assert_nil proxy_class.proxy_pass
- refute_equal 8000, proxy_class.proxy_port
+ assert_not_equal 8000, proxy_class.proxy_port
http = proxy_class.new 'hostname.example'
@@ -488,7 +488,7 @@ module TestNetHTTP_version_1_2_methods
assert_equal $test_net_http_data.size, res.body.size
assert_equal $test_net_http_data, res.body
- refute res.decode_content, 'Bug #7831' if Net::HTTP::HAVE_ZLIB
+ assert_not_predicate res, :decode_content, 'Bug #7831' if Net::HTTP::HAVE_ZLIB
}
end
@@ -562,12 +562,12 @@ module TestNetHTTP_version_1_2_methods
assert_kind_of URI::Generic, req.uri
- refute_equal uri, req.uri
+ assert_not_equal uri, req.uri
assert_equal uri, res.uri
- refute_same uri, req.uri
- refute_same req.uri, res.uri
+ assert_not_same uri, req.uri
+ assert_not_same req.uri, res.uri
end
def _test_request__uri(http)
@@ -578,12 +578,12 @@ module TestNetHTTP_version_1_2_methods
assert_kind_of URI::Generic, req.uri
- refute_equal uri, req.uri
+ assert_not_equal uri, req.uri
assert_equal req.uri, res.uri
- refute_same uri, req.uri
- refute_same req.uri, res.uri
+ assert_not_same uri, req.uri
+ assert_not_same req.uri, res.uri
end
def _test_request__uri_host(http)
diff --git a/test/net/http/test_http_request.rb b/test/net/http/test_http_request.rb
index 35c935ac58..c2144d86c7 100644
--- a/test/net/http/test_http_request.rb
+++ b/test/net/http/test_http_request.rb
@@ -9,8 +9,8 @@ class HTTPRequestTest < Test::Unit::TestCase
req = Net::HTTP::Get.new '/'
assert_equal 'GET', req.method
- refute req.request_body_permitted?
- assert req.response_body_permitted?
+ assert_not_predicate req, :request_body_permitted?
+ assert_predicate req, :response_body_permitted?
expected = {
'accept' => %w[*/*],
@@ -27,8 +27,8 @@ class HTTPRequestTest < Test::Unit::TestCase
req = Net::HTTP::Get.new '/', 'Range' => 'bytes=0-9'
assert_equal 'GET', req.method
- refute req.request_body_permitted?
- assert req.response_body_permitted?
+ assert_not_predicate req, :request_body_permitted?
+ assert_predicate req, :response_body_permitted?
expected = {
'accept' => %w[*/*],
@@ -43,8 +43,8 @@ class HTTPRequestTest < Test::Unit::TestCase
req = Net::HTTP::Head.new '/'
assert_equal 'HEAD', req.method
- refute req.request_body_permitted?
- refute req.response_body_permitted?
+ assert_not_predicate req, :request_body_permitted?
+ assert_not_predicate req, :response_body_permitted?
expected = {
'accept' => %w[*/*],
@@ -61,8 +61,8 @@ class HTTPRequestTest < Test::Unit::TestCase
req2 = Net::HTTP::Get.new '/', 'accept-encoding' => 'identity'
- refute req2.decode_content,
- 'Bug #7381 - do not decode content if the user overrides'
+ assert_not_predicate req2, :decode_content,
+ 'Bug #7381 - do not decode content if the user overrides'
end if Net::HTTP::HAVE_ZLIB
def test_header_set
@@ -72,8 +72,8 @@ class HTTPRequestTest < Test::Unit::TestCase
req['accept-encoding'] = 'identity'
- refute req.decode_content,
- 'Bug #7831 - do not decode content if the user overrides'
+ assert_not_predicate req, :decode_content,
+ 'Bug #7831 - do not decode content if the user overrides'
end if Net::HTTP::HAVE_ZLIB
end
diff --git a/test/net/http/test_httpresponse.rb b/test/net/http/test_httpresponse.rb
index eb1a792e87..a494b7fb85 100644
--- a/test/net/http/test_httpresponse.rb
+++ b/test/net/http/test_httpresponse.rb
@@ -323,7 +323,7 @@ EOS
response.uri = uri
assert_equal uri, response.uri
- refute_same uri, response.uri
+ assert_not_same uri, response.uri
end
def test_ensure_zero_space_does_not_regress