aboutsummaryrefslogtreecommitdiffstats
path: root/test/drb/drbtest.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-22 03:53:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-22 03:53:41 +0000
commitf136a3225e5fdd37961b8ed0e29c96e4a40f0d64 (patch)
treed33dfde2fb79afba368732768bf4f6bdf0e90480 /test/drb/drbtest.rb
parent4650c38d8b157667c6e9532174297f9e72bc4c34 (diff)
downloadruby-f136a3225e5fdd37961b8ed0e29c96e4a40f0d64.tar.gz
* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
ignore tests which raised LoadError. * test/drb/drbtest.rb, test/ruby/test_beginendblock.rb, test/ruby/test_system.rb: avoid requiring same file twice. * test/drb/test_drbssl.rb, test/drb/test_drbunix.rb: should not use ARGV unless invoked directly. do not create test cases unless required libraries are available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/drb/drbtest.rb')
-rw-r--r--test/drb/drbtest.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index 5cdcd25dfd..cc3c4d4346 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -1,10 +1,9 @@
-require "#{File.dirname(File.expand_path(__FILE__))}/drbtest"
require 'test/unit'
require 'drb/drb'
require 'drb/extservm'
require 'timeout'
-
-require "#{File.dirname(File.expand_path(__FILE__))}/../ruby/envutil"
+$:.unshift(File.expand_path("../../ruby", __FILE__))
+require 'envutil'
class DRbService
@@manager = DRb::ExtServManager.new
@@ -68,11 +67,11 @@ module DRbCore
ro = DRbObject.new(nil, 'druby://localhost:12345')
assert_equal('druby://localhost:12345', ro.__drburi)
assert_equal(nil, ro.__drbref)
-
+
ro = DRbObject.new_with_uri('druby://localhost:12345')
assert_equal('druby://localhost:12345', ro.__drburi)
assert_equal(nil, ro.__drbref)
-
+
ro = DRbObject.new_with_uri('druby://localhost:12345?foobar')
assert_equal('druby://localhost:12345', ro.__drburi)
assert_equal(DRb::DRbURIOption.new('foobar'), ro.__drbref)
@@ -88,7 +87,7 @@ module DRbCore
def test_01_02_loop
onecky = Onecky.new('3')
- 50.times do
+ 50.times do
assert_equal(6, @there.sample(onecky, 1, 2))
ary = @there.to_a
assert_kind_of(DRb::DRbObject, ary)
@@ -166,14 +165,14 @@ module DRbCore
begin
@there.method_missing(:eval)
rescue NameError
- assert_match(/^private method `eval'/, $!.message)
+ assert_match(/^private method \`eval\'/, $!.message)
end
}
assert_nothing_raised() {
begin
@there.method_missing(:undefined_method_test)
rescue NameError
- assert_match(/^undefined method `undefined_method_test'/, $!.message)
+ assert_match(/^undefined method \`undefined_method_test\'/, $!.message)
end
}
assert_raises(SecurityError) do
@@ -184,7 +183,7 @@ module DRbCore
def test_08_here
ro = DRbObject.new(nil, DRb.uri)
assert_kind_of(String, ro.to_s)
-
+
ro = DRbObject.new_with_uri(DRb.uri)
assert_kind_of(String, ro.to_s)
end