summaryrefslogtreecommitdiff
path: root/test/drb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-11 12:12:17 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-11 12:12:17 +0000
commita402acbbb6e366a21554e8e9f74b05c4a4116621 (patch)
treefb4ea8ee097a0d71329508ecee93ea28f524d879 /test/drb
parentd4b0bf031d38e6af65f3055601f7a10ce150d5b6 (diff)
add DRbRemoteError. [ruby-list:40348], [ruby-list:40390]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/drb')
-rw-r--r--test/drb/drbtest.rb13
-rw-r--r--test/drb/ut_drb.rb4
2 files changed, 17 insertions, 0 deletions
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index a102f7e..d2335dd 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -231,6 +231,19 @@ module DRbCore
assert_kind_of(DRbObject, v)
end
end
+
+ def test_11_remote_no_method_error
+ assert_raises(DRb::DRbRemoteError) do
+ @there.remote_no_method_error
+ end
+ begin
+ @there.remote_no_method_error
+ rescue
+ error = $!
+ assert_match(/^undefined method .*\(NoMethodError\)/, error.message)
+ assert_equal('NoMethodError', error.reason)
+ end
+ end
end
module DRbAry
diff --git a/test/drb/ut_drb.rb b/test/drb/ut_drb.rb
index e7eedf8..b0d3a5b 100644
--- a/test/drb/ut_drb.rb
+++ b/test/drb/ut_drb.rb
@@ -66,6 +66,10 @@ class DRbEx
raise UError
end
+ def remote_no_method_error
+ invoke_no_method(self)
+ end
+
def test_yield
yield
yield([])