summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_httpauth.rb4
-rw-r--r--test/webrick/test_httprequest.rb8
-rw-r--r--test/webrick/test_httputils.rb36
-rw-r--r--test/webrick/test_utils.rb12
4 files changed, 30 insertions, 30 deletions
diff --git a/test/webrick/test_httpauth.rb b/test/webrick/test_httpauth.rb
index 75926b1624..427f839f35 100644
--- a/test/webrick/test_httpauth.rb
+++ b/test/webrick/test_httpauth.rb
@@ -66,7 +66,7 @@ class TestWEBrickHTTPAuth < Test::Unit::TestCase
tmpfile = Tempfile.new("test_webrick_auth")
tmpfile.puts("webrick:{SHA}GJYFRpBbdchp595jlh3Bhfmgp8k=")
tmpfile.flush
- assert_raises(NotImplementedError){
+ assert_raise(NotImplementedError){
WEBrick::HTTPAuth::Htpasswd.new(tmpfile.path)
}
tmpfile.close(true)
@@ -74,7 +74,7 @@ class TestWEBrickHTTPAuth < Test::Unit::TestCase
tmpfile = Tempfile.new("test_webrick_auth")
tmpfile.puts("webrick:$apr1$IOVMD/..$rmnOSPXr0.wwrLPZHBQZy0")
tmpfile.flush
- assert_raises(NotImplementedError){
+ assert_raise(NotImplementedError){
WEBrick::HTTPAuth::Htpasswd.new(tmpfile.path)
}
tmpfile.close(true)
diff --git a/test/webrick/test_httprequest.rb b/test/webrick/test_httprequest.rb
index f49bd59384..92ad1e79ca 100644
--- a/test/webrick/test_httprequest.rb
+++ b/test/webrick/test_httprequest.rb
@@ -61,7 +61,7 @@ class TestWEBrickHTTPRequest < Test::Unit::TestCase
GET /#{"a"*1024} HTTP/1.1
_end_of_message_
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
- assert_raises(WEBrick::HTTPStatus::RequestURITooLarge){
+ assert_raise(WEBrick::HTTPStatus::RequestURITooLarge){
req.parse(StringIO.new(msg.gsub(/^ {6}/, "")))
}
end
@@ -314,7 +314,7 @@ class TestWEBrickHTTPRequest < Test::Unit::TestCase
#{param}
_end_of_message_
- assert_raises(WEBrick::HTTPStatus::LengthRequired){
+ assert_raise(WEBrick::HTTPStatus::LengthRequired){
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
req.parse(StringIO.new(msg.gsub(/^ {6}/, "")))
req.body
@@ -327,7 +327,7 @@ class TestWEBrickHTTPRequest < Test::Unit::TestCase
body is too short.
_end_of_message_
- assert_raises(WEBrick::HTTPStatus::BadRequest){
+ assert_raise(WEBrick::HTTPStatus::BadRequest){
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
req.parse(StringIO.new(msg.gsub(/^ {6}/, "")))
req.body
@@ -340,7 +340,7 @@ class TestWEBrickHTTPRequest < Test::Unit::TestCase
body is too short.
_end_of_message_
- assert_raises(WEBrick::HTTPStatus::NotImplemented){
+ assert_raise(WEBrick::HTTPStatus::NotImplemented){
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
req.parse(StringIO.new(msg.gsub(/^ {6}/, "")))
req.body
diff --git a/test/webrick/test_httputils.rb b/test/webrick/test_httputils.rb
index 9d39ff53ab..ebe8a2b8a5 100644
--- a/test/webrick/test_httputils.rb
+++ b/test/webrick/test_httputils.rb
@@ -30,24 +30,24 @@ class TestWEBrickHTTPUtils < Test::Unit::TestCase
assert_equal("/foo/bar/", normalize_path("//foo///.//bar/.///.//"))
assert_equal("/", normalize_path("//foo///..///bar/.///..//.//"))
- assert_raises(RuntimeError){ normalize_path("foo/bar") }
- assert_raises(RuntimeError){ normalize_path("..") }
- assert_raises(RuntimeError){ normalize_path("/..") }
- assert_raises(RuntimeError){ normalize_path("/./..") }
- assert_raises(RuntimeError){ normalize_path("/./../") }
- assert_raises(RuntimeError){ normalize_path("/./../..") }
- assert_raises(RuntimeError){ normalize_path("/./../../") }
- assert_raises(RuntimeError){ normalize_path("/./../") }
- assert_raises(RuntimeError){ normalize_path("/../..") }
- assert_raises(RuntimeError){ normalize_path("/../../") }
- assert_raises(RuntimeError){ normalize_path("/../../..") }
- assert_raises(RuntimeError){ normalize_path("/../../../") }
- assert_raises(RuntimeError){ normalize_path("/../foo/../") }
- assert_raises(RuntimeError){ normalize_path("/../foo/../../") }
- assert_raises(RuntimeError){ normalize_path("/foo/bar/../../../../") }
- assert_raises(RuntimeError){ normalize_path("/foo/../bar/../../") }
- assert_raises(RuntimeError){ normalize_path("/./../bar/") }
- assert_raises(RuntimeError){ normalize_path("/./../") }
+ assert_raise(RuntimeError){ normalize_path("foo/bar") }
+ assert_raise(RuntimeError){ normalize_path("..") }
+ assert_raise(RuntimeError){ normalize_path("/..") }
+ assert_raise(RuntimeError){ normalize_path("/./..") }
+ assert_raise(RuntimeError){ normalize_path("/./../") }
+ assert_raise(RuntimeError){ normalize_path("/./../..") }
+ assert_raise(RuntimeError){ normalize_path("/./../../") }
+ assert_raise(RuntimeError){ normalize_path("/./../") }
+ assert_raise(RuntimeError){ normalize_path("/../..") }
+ assert_raise(RuntimeError){ normalize_path("/../../") }
+ assert_raise(RuntimeError){ normalize_path("/../../..") }
+ assert_raise(RuntimeError){ normalize_path("/../../../") }
+ assert_raise(RuntimeError){ normalize_path("/../foo/../") }
+ assert_raise(RuntimeError){ normalize_path("/../foo/../../") }
+ assert_raise(RuntimeError){ normalize_path("/foo/bar/../../../../") }
+ assert_raise(RuntimeError){ normalize_path("/foo/../bar/../../") }
+ assert_raise(RuntimeError){ normalize_path("/./../bar/") }
+ assert_raise(RuntimeError){ normalize_path("/./../") }
end
def test_split_header_value
diff --git a/test/webrick/test_utils.rb b/test/webrick/test_utils.rb
index ace4632547..e63e0ebbfd 100644
--- a/test/webrick/test_utils.rb
+++ b/test/webrick/test_utils.rb
@@ -16,9 +16,9 @@ class TestWEBrickUtils < Test::Unit::TestCase
assert_expired(true, m)
i = 0
- assert_raises(Timeout::Error){
+ assert_raise(Timeout::Error){
m.timeout(2){
- assert_raises(Timeout::Error){ m.timeout(1){ i += 1; sleep } }
+ assert_raise(Timeout::Error){ m.timeout(1){ i += 1; sleep } }
assert_expired(false, m)
i += 1
sleep
@@ -27,14 +27,14 @@ class TestWEBrickUtils < Test::Unit::TestCase
assert_equal(2, i)
assert_expired(true, m)
- assert_raises(Timeout::Error){ m.timeout(0.1){ sleep } }
+ assert_raise(Timeout::Error){ m.timeout(0.1){ sleep } }
assert_expired(true, m)
- assert_raises(ex){ m.timeout(0.1, ex){ sleep } }
+ assert_raise(ex){ m.timeout(0.1, ex){ sleep } }
assert_expired(true, m)
i = 0
- assert_raises(ex){
+ assert_raise(ex){
m.timeout(10){
m.timeout(1, ex){ i += 1; sleep }
}
@@ -44,7 +44,7 @@ class TestWEBrickUtils < Test::Unit::TestCase
assert_expired(true, m)
i = 0
- assert_raises(Timeout::Error){
+ assert_raise(Timeout::Error){
m.timeout(1){
m.timeout(10, ex){ i += 1; sleep }
}