summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 17:44:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 17:44:39 +0000
commit00b4a3f9c4aaf5aa038a9530ec515e1718ae1c42 (patch)
treeb57bc2afea00aa87978f691526dd7adc1b8a067d /test/webrick
parent48fdf59dcfbb6964d992b6f31d0eb6f023776145 (diff)
* test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 75926b1..427f839 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 f49bd59..92ad1e7 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 9d39ff5..ebe8a2b 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 ace4632..e63e0eb 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 }
}