summaryrefslogtreecommitdiff
path: root/test/xmlrpc
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/xmlrpc
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/xmlrpc')
-rw-r--r--test/xmlrpc/test_datetime.rb46
-rw-r--r--test/xmlrpc/test_features.rb4
-rw-r--r--test/xmlrpc/test_webrick_server.rb2
3 files changed, 26 insertions, 26 deletions
diff --git a/test/xmlrpc/test_datetime.rb b/test/xmlrpc/test_datetime.rb
index e38cea6..528e080 100644
--- a/test/xmlrpc/test_datetime.rb
+++ b/test/xmlrpc/test_datetime.rb
@@ -10,18 +10,18 @@ class Test_DateTime < Test::Unit::TestCase
end
def test_new_exception
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(4.5, 13, 32, 25, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 32, 25, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 25, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 60) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(4.5, 13, 32, 25, 60, 60) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 32, 25, 60, 60) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 25, 60, 60) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 60, 60) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 60) }
assert_nothing_raised(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 59) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 0, 0, -1, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 0, -1, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, -1, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, -1) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 0, 0, -1, -1, -1) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 0, -1, -1, -1) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, -1, -1, -1) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, -1, -1) }
+ assert_raise(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, -1) }
assert_nothing_raised(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, 0) }
end
@@ -68,31 +68,31 @@ class Test_DateTime < Test::Unit::TestCase
def test_set_exception
dt = createDateTime()
- assert_raises(ArgumentError) { dt.year = 4.5 }
+ assert_raise(ArgumentError) { dt.year = 4.5 }
assert_nothing_raised(ArgumentError) { dt.year = -2000 }
- assert_raises(ArgumentError) { dt.month = 0 }
- assert_raises(ArgumentError) { dt.month = 13 }
+ assert_raise(ArgumentError) { dt.month = 0 }
+ assert_raise(ArgumentError) { dt.month = 13 }
assert_nothing_raised(ArgumentError) { dt.month = 7 }
- assert_raises(ArgumentError) { dt.mon = 0 }
- assert_raises(ArgumentError) { dt.mon = 13 }
+ assert_raise(ArgumentError) { dt.mon = 0 }
+ assert_raise(ArgumentError) { dt.mon = 13 }
assert_nothing_raised(ArgumentError) { dt.mon = 7 }
- assert_raises(ArgumentError) { dt.day = 0 }
- assert_raises(ArgumentError) { dt.day = 32 }
+ assert_raise(ArgumentError) { dt.day = 0 }
+ assert_raise(ArgumentError) { dt.day = 32 }
assert_nothing_raised(ArgumentError) { dt.day = 16 }
- assert_raises(ArgumentError) { dt.hour = -1 }
- assert_raises(ArgumentError) { dt.hour = 25 }
+ assert_raise(ArgumentError) { dt.hour = -1 }
+ assert_raise(ArgumentError) { dt.hour = 25 }
assert_nothing_raised(ArgumentError) { dt.hour = 12 }
- assert_raises(ArgumentError) { dt.min = -1 }
- assert_raises(ArgumentError) { dt.min = 60 }
+ assert_raise(ArgumentError) { dt.min = -1 }
+ assert_raise(ArgumentError) { dt.min = 60 }
assert_nothing_raised(ArgumentError) { dt.min = 30 }
- assert_raises(ArgumentError) { dt.sec = -1 }
- assert_raises(ArgumentError) { dt.sec = 60 }
+ assert_raise(ArgumentError) { dt.sec = -1 }
+ assert_raise(ArgumentError) { dt.sec = 60 }
assert_nothing_raised(ArgumentError) { dt.sec = 30 }
end
diff --git a/test/xmlrpc/test_features.rb b/test/xmlrpc/test_features.rb
index 96a6313..377d539 100644
--- a/test/xmlrpc/test_features.rb
+++ b/test/xmlrpc/test_features.rb
@@ -15,7 +15,7 @@ class Test_Features < Test::Unit::TestCase
XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)}
XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, false)
- assert_raises(RuntimeError) { str = c.methodCall("test", *@params) }
+ assert_raise(RuntimeError) { str = c.methodCall("test", *@params) }
XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)}
XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, true)
@@ -35,7 +35,7 @@ class Test_Features < Test::Unit::TestCase
XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_PARSER)}
XMLRPC::Config.const_set(:ENABLE_NIL_PARSER, false)
- assert_raises(RuntimeError) { para = parser.parseMethodCall(str) }
+ assert_raise(RuntimeError) { para = parser.parseMethodCall(str) }
XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_PARSER)}
XMLRPC::Config.const_set(:ENABLE_NIL_PARSER, true)
diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb
index 4cd63cf..38cfe2f 100644
--- a/test/xmlrpc/test_webrick_server.rb
+++ b/test/xmlrpc/test_webrick_server.rb
@@ -68,7 +68,7 @@ class Test_Webrick < Test::Unit::TestCase
assert_equal 9, @s.call('test.add', 4, 5)
# fault exception
- assert_raises(XMLRPC::FaultException) { @s.call('test.div', 1, 0) }
+ assert_raise(XMLRPC::FaultException) { @s.call('test.div', 1, 0) }
# fault exception via call2
ok, param = @s.call2('test.div', 1, 0)