1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test: use require_relative.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-09-12 17:00:51 +00:00
parent 945b604e3a
commit 6bbed0e31b
7 changed files with 7 additions and 35 deletions

View file

@ -2,13 +2,7 @@ require 'test/unit'
require 'drb/drb'
require 'drb/extservm'
require 'timeout'
begin
loadpath = $:.dup
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
require 'envutil'
ensure
$:.replace(loadpath)
end
require_relative '../ruby/envutil'
class DRbService
@@manager = DRb::ExtServManager.new

View file

@ -7,10 +7,7 @@ require 'test/unit'
if defined?(OpenSSL)
require 'socket'
dir = File.expand_path(__FILE__)
2.times {dir = File.dirname(dir)}
$:.replace([File.join(dir, "ruby")] | $:)
require 'ut_eof'
require_relative '../ruby/ut_eof'
module SSLPair
def server

View file

@ -1,18 +1,12 @@
begin
require "openssl"
require File.join(File.dirname(__FILE__), "utils.rb")
require_relative "utils.rb"
rescue LoadError
end
require "rbconfig"
require "socket"
require "test/unit"
begin
loadpath = $:.dup
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
require 'envutil'
ensure
$:.replace(loadpath)
end
require_relative '../ruby/envutil'
if defined?(OpenSSL)

View file

@ -4,7 +4,7 @@
# See LICENSE.txt for permissions.
#++
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
require_relative 'gemutilities'
require 'rubygems/package'
class TestKernel < RubyGemTestCase

View file

@ -1,9 +1,6 @@
require 'test/unit'
require 'stringio'
dir = File.expand_path(__FILE__)
2.times {dir = File.dirname(dir)}
$:.replace([File.join(dir, "ruby")] | $:)
require 'ut_eof'
require_relative '../ruby/ut_eof'
class TestStringIO < Test::Unit::TestCase
include TestEOF

View file

@ -6,10 +6,6 @@
# If in doubt, ask your admin.
require 'test/unit'
# Prepend current directory to load path for testing.
$:.unshift('.')
require 'syslog'
class TestSyslog < Test::Unit::TestCase

View file

@ -1,10 +1,4 @@
begin
loadpath = $:.dup
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
require 'envutil'
ensure
$:.replace(loadpath)
end
require_relative '../ruby/envutil'
require "webrick"
begin
require "webrick/https"