зеркало из https://github.com/github/ruby.git
* 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:
Родитель
945b604e3a
Коммит
6bbed0e31b
|
@ -2,13 +2,7 @@ require 'test/unit'
|
||||||
require 'drb/drb'
|
require 'drb/drb'
|
||||||
require 'drb/extservm'
|
require 'drb/extservm'
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
begin
|
require_relative '../ruby/envutil'
|
||||||
loadpath = $:.dup
|
|
||||||
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
|
|
||||||
require 'envutil'
|
|
||||||
ensure
|
|
||||||
$:.replace(loadpath)
|
|
||||||
end
|
|
||||||
|
|
||||||
class DRbService
|
class DRbService
|
||||||
@@manager = DRb::ExtServManager.new
|
@@manager = DRb::ExtServManager.new
|
||||||
|
|
|
@ -7,10 +7,7 @@ require 'test/unit'
|
||||||
if defined?(OpenSSL)
|
if defined?(OpenSSL)
|
||||||
|
|
||||||
require 'socket'
|
require 'socket'
|
||||||
dir = File.expand_path(__FILE__)
|
require_relative '../ruby/ut_eof'
|
||||||
2.times {dir = File.dirname(dir)}
|
|
||||||
$:.replace([File.join(dir, "ruby")] | $:)
|
|
||||||
require 'ut_eof'
|
|
||||||
|
|
||||||
module SSLPair
|
module SSLPair
|
||||||
def server
|
def server
|
||||||
|
|
|
@ -1,18 +1,12 @@
|
||||||
begin
|
begin
|
||||||
require "openssl"
|
require "openssl"
|
||||||
require File.join(File.dirname(__FILE__), "utils.rb")
|
require_relative "utils.rb"
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
end
|
end
|
||||||
require "rbconfig"
|
require "rbconfig"
|
||||||
require "socket"
|
require "socket"
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
begin
|
require_relative '../ruby/envutil'
|
||||||
loadpath = $:.dup
|
|
||||||
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
|
|
||||||
require 'envutil'
|
|
||||||
ensure
|
|
||||||
$:.replace(loadpath)
|
|
||||||
end
|
|
||||||
|
|
||||||
if defined?(OpenSSL)
|
if defined?(OpenSSL)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# See LICENSE.txt for permissions.
|
# See LICENSE.txt for permissions.
|
||||||
#++
|
#++
|
||||||
|
|
||||||
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
|
require_relative 'gemutilities'
|
||||||
require 'rubygems/package'
|
require 'rubygems/package'
|
||||||
|
|
||||||
class TestKernel < RubyGemTestCase
|
class TestKernel < RubyGemTestCase
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
dir = File.expand_path(__FILE__)
|
require_relative '../ruby/ut_eof'
|
||||||
2.times {dir = File.dirname(dir)}
|
|
||||||
$:.replace([File.join(dir, "ruby")] | $:)
|
|
||||||
require 'ut_eof'
|
|
||||||
|
|
||||||
class TestStringIO < Test::Unit::TestCase
|
class TestStringIO < Test::Unit::TestCase
|
||||||
include TestEOF
|
include TestEOF
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
# If in doubt, ask your admin.
|
# If in doubt, ask your admin.
|
||||||
|
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
|
||||||
# Prepend current directory to load path for testing.
|
|
||||||
$:.unshift('.')
|
|
||||||
|
|
||||||
require 'syslog'
|
require 'syslog'
|
||||||
|
|
||||||
class TestSyslog < Test::Unit::TestCase
|
class TestSyslog < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
begin
|
require_relative '../ruby/envutil'
|
||||||
loadpath = $:.dup
|
|
||||||
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
|
|
||||||
require 'envutil'
|
|
||||||
ensure
|
|
||||||
$:.replace(loadpath)
|
|
||||||
end
|
|
||||||
require "webrick"
|
require "webrick"
|
||||||
begin
|
begin
|
||||||
require "webrick/https"
|
require "webrick/https"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче