summaryrefslogtreecommitdiff
path: root/test/drb
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/drb
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/drb')
-rw-r--r--test/drb/drbtest.rb16
-rw-r--r--test/drb/test_drb.rb14
2 files changed, 15 insertions, 15 deletions
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index 143d856..e06139a 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -127,23 +127,23 @@ module DRbCore
assert_equal('DRbEx', obj.name)
end
- assert_raises(DRb::DRbUnknownError) do
+ assert_raise(DRb::DRbUnknownError) do
@there.unknown_error
end
onecky = FailOnecky.new('3')
- assert_raises(FailOnecky::OneckyError) do
+ assert_raise(FailOnecky::OneckyError) do
@there.sample(onecky, 1, 2)
end
end
def test_03
assert_equal(8, @there.sum(1, 1, 1, 1, 1, 1, 1, 1))
- assert_raises(ArgumentError) do
+ assert_raise(ArgumentError) do
@there.sum(1, 1, 1, 1, 1, 1, 1, 1, 1)
end
- assert_raises(DRb::DRbConnError) do
+ assert_raise(DRb::DRbConnError) do
@there.sum('1' * 4096)
end
end
@@ -168,10 +168,10 @@ module DRbCore
def test_06_timeout
ten = Onecky.new(10)
- assert_raises(TimeoutError) do
+ assert_raise(TimeoutError) do
@there.do_timeout(ten)
end
- assert_raises(TimeoutError) do
+ assert_raise(TimeoutError) do
@there.do_timeout(ten)
end
end
@@ -208,7 +208,7 @@ module DRbCore
assert_match(/^undefined method \`undefined_method_test\'/, $!.message)
end
}
- assert_raises(DRb::DRbConnError) do
+ assert_raise(DRb::DRbConnError) do
@there.method_missing(:__send__, :to_s)
end
assert_equal(true, @there.missing)
@@ -261,7 +261,7 @@ module DRbCore
end
def test_11_remote_no_method_error
- assert_raises(DRb::DRbRemoteError) do
+ assert_raise(DRb::DRbRemoteError) do
@there.remote_no_method_error
end
begin
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index 106e958..57cf717 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -219,21 +219,21 @@ class TestDRbEval # < Test::Unit::TestCase
end
def test_01_safe1_safe4_eval
- assert_raises(SecurityError) do
+ assert_raise(SecurityError) do
@there.method_missing(:instance_eval, 'ENV.inspect')
end
- assert_raises(SecurityError) do
+ assert_raise(SecurityError) do
@there.method_missing(:send, :eval, 'ENV.inspect')
end
remote_class = @there.remote_class
- assert_raises(SecurityError) do
+ assert_raise(SecurityError) do
remote_class.class_eval('ENV.inspect')
end
- assert_raises(SecurityError) do
+ assert_raise(SecurityError) do
remote_class.module_eval('ENV.inspect')
end
@@ -246,11 +246,11 @@ class TestDRbEval # < Test::Unit::TestCase
assert_equal(1, remote_class.module_eval('1'))
- assert_raises(SecurityError) do
+ assert_raise(SecurityError) do
remote_class.class_eval('ENV = {}')
end
- assert_raises(SecurityError) do
+ assert_raise(SecurityError) do
remote_class.module_eval('ENV = {}')
end
end
@@ -283,7 +283,7 @@ class TestDRbLarge < Test::Unit::TestCase
end
def test_04_many_arg
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
@there.arg_test(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
}
end