summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/digest/test_digest_hmac.rb3
-rw-r--r--test/dl/test_handle.rb2
-rw-r--r--test/drb/test_drb.rb2
-rw-r--r--test/drb/test_drbssl.rb2
-rw-r--r--test/drb/test_drbunix.rb2
-rw-r--r--test/openssl/test_asn1.rb2
-rw-r--r--test/openssl/test_ns_spki.rb2
-rw-r--r--test/openssl/test_pkcs7.rb2
-rw-r--r--test/openssl/test_x509cert.rb2
-rw-r--r--test/openssl/test_x509crl.rb2
-rw-r--r--test/openssl/test_x509req.rb2
-rw-r--r--test/openssl/test_x509store.rb2
-rw-r--r--test/optparse/test_getopts.rb1
-rw-r--r--test/optparse/test_noarg.rb2
-rw-r--r--test/optparse/test_optarg.rb2
-rw-r--r--test/optparse/test_placearg.rb2
-rw-r--r--test/optparse/test_reqarg.rb2
-rw-r--r--test/ruby/test_case.rb2
-rw-r--r--test/test_ipaddr.rb3
-rw-r--r--test/test_set.rb3
-rw-r--r--test/webrick/test_cgi.rb2
-rw-r--r--test/webrick/test_filehandler.rb2
-rw-r--r--test/webrick/test_httpauth.rb2
-rw-r--r--test/webrick/test_httpserver.rb2
-rw-r--r--test/webrick/test_server.rb2
-rw-r--r--test/xmlrpc/test_cookie.rb2
-rw-r--r--test/xmlrpc/test_webrick_server.rb2
27 files changed, 27 insertions, 29 deletions
diff --git a/test/digest/test_digest_hmac.rb b/test/digest/test_digest_hmac.rb
index a0d5d2f..3eb1567 100644
--- a/test/digest/test_digest_hmac.rb
+++ b/test/digest/test_digest_hmac.rb
@@ -1,3 +1,2 @@
-require 'pathname'
-require Pathname.new(__FILE__).dirname.join('../inlinetest.rb')
+require_relative '../inlinetest.rb'
InlineTest.loadtest__END__part('digest/hmac.rb')
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb
index f2b1de3..70a5f85 100644
--- a/test/dl/test_handle.rb
+++ b/test/dl/test_handle.rb
@@ -1,4 +1,4 @@
-require 'test_base'
+require_relative 'test_base'
module DL
class TestHandle < TestBase
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index 0548dc7..2931023 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -1,4 +1,4 @@
-require 'drbtest'
+require_relative 'drbtest'
class TestDRbCore < Test::Unit::TestCase
include DRbCore
diff --git a/test/drb/test_drbssl.rb b/test/drb/test_drbssl.rb
index cfb3bc3..8f6c4f2 100644
--- a/test/drb/test_drbssl.rb
+++ b/test/drb/test_drbssl.rb
@@ -1,4 +1,4 @@
-require 'drbtest'
+require_relative 'drbtest'
begin
require 'drb/ssl'
diff --git a/test/drb/test_drbunix.rb b/test/drb/test_drbunix.rb
index e1a17ed..5b93f52 100644
--- a/test/drb/test_drbunix.rb
+++ b/test/drb/test_drbunix.rb
@@ -1,4 +1,4 @@
-require 'drbtest'
+require_relative 'drbtest'
begin
require 'drb/unix'
diff --git a/test/openssl/test_asn1.rb b/test/openssl/test_asn1.rb
index 86811a4..04bbd7f 100644
--- a/test/openssl/test_asn1.rb
+++ b/test/openssl/test_asn1.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative 'utils'
rescue LoadError
end
require 'test/unit'
diff --git a/test/openssl/test_ns_spki.rb b/test/openssl/test_ns_spki.rb
index 3937132..14895ed 100644
--- a/test/openssl/test_ns_spki.rb
+++ b/test/openssl/test_ns_spki.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative 'utils'
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_pkcs7.rb b/test/openssl/test_pkcs7.rb
index d86de36..85e9b89 100644
--- a/test/openssl/test_pkcs7.rb
+++ b/test/openssl/test_pkcs7.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative 'utils'
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb
index 398ab2f..4020d90 100644
--- a/test/openssl/test_x509cert.rb
+++ b/test/openssl/test_x509cert.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509crl.rb b/test/openssl/test_x509crl.rb
index e1f4e00..5a12c29 100644
--- a/test/openssl/test_x509crl.rb
+++ b/test/openssl/test_x509crl.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509req.rb b/test/openssl/test_x509req.rb
index a37ed5c..1ca56d7 100644
--- a/test/openssl/test_x509req.rb
+++ b/test/openssl/test_x509req.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509store.rb b/test/openssl/test_x509store.rb
index fc7c35e..7d0127a 100644
--- a/test/openssl/test_x509store.rb
+++ b/test/openssl/test_x509store.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/optparse/test_getopts.rb b/test/optparse/test_getopts.rb
index fdefe5f..1ba194a 100644
--- a/test/optparse/test_getopts.rb
+++ b/test/optparse/test_getopts.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require 'optparse'
class TestOptionParserGetopts < Test::Unit::TestCase
def setup
diff --git a/test/optparse/test_noarg.rb b/test/optparse/test_noarg.rb
index 329956a..3e6ed42 100644
--- a/test/optparse/test_noarg.rb
+++ b/test/optparse/test_noarg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
module TestOptionParser::NoArg
class Def1 < TestOptionParser
diff --git a/test/optparse/test_optarg.rb b/test/optparse/test_optarg.rb
index 49cb1b9..2058e37 100644
--- a/test/optparse/test_optarg.rb
+++ b/test/optparse/test_optarg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
class TestOptionParser::OptArg < TestOptionParser
def setup
diff --git a/test/optparse/test_placearg.rb b/test/optparse/test_placearg.rb
index ea5810c..1aec01e 100644
--- a/test/optparse/test_placearg.rb
+++ b/test/optparse/test_placearg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
class TestOptionParser::PlaceArg < TestOptionParser
def setup
diff --git a/test/optparse/test_reqarg.rb b/test/optparse/test_reqarg.rb
index 5797946..47c9e9a 100644
--- a/test/optparse/test_reqarg.rb
+++ b/test/optparse/test_reqarg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
module TestOptionParser::ReqArg
class Def1 < TestOptionParser
diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb
index c4938ee..c4bffa8 100644
--- a/test/ruby/test_case.rb
+++ b/test/ruby/test_case.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require 'envutil.rb'
+require_relative 'envutil.rb'
class TestCase < Test::Unit::TestCase
def test_case
diff --git a/test/test_ipaddr.rb b/test/test_ipaddr.rb
index 604ce93..dd4b4af 100644
--- a/test/test_ipaddr.rb
+++ b/test/test_ipaddr.rb
@@ -1,4 +1,3 @@
-require 'pathname'
-require Pathname.new(__FILE__).dirname.join('inlinetest.rb')
+require_relative 'inlinetest.rb'
target = __FILE__[/test_(.*\.rb)$/, 1]
InlineTest.loadtest__END__part(target)
diff --git a/test/test_set.rb b/test/test_set.rb
index 604ce93..dd4b4af 100644
--- a/test/test_set.rb
+++ b/test/test_set.rb
@@ -1,4 +1,3 @@
-require 'pathname'
-require Pathname.new(__FILE__).dirname.join('inlinetest.rb')
+require_relative 'inlinetest.rb'
target = __FILE__[/test_(.*\.rb)$/, 1]
InlineTest.loadtest__END__part(target)
diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb
index ab6f567..4bfb3df 100644
--- a/test/webrick/test_cgi.rb
+++ b/test/webrick/test_cgi.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
require "webrick"
require "test/unit"
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index 194ec0f..9dfd9c2 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -1,5 +1,5 @@
require "test/unit"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils.rb"
require "webrick"
require "stringio"
diff --git a/test/webrick/test_httpauth.rb b/test/webrick/test_httpauth.rb
index 56f9623..a606690 100644
--- a/test/webrick/test_httpauth.rb
+++ b/test/webrick/test_httpauth.rb
@@ -3,7 +3,7 @@ require "net/http"
require "tempfile"
require "webrick"
require "webrick/httpauth/basicauth"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
class TestWEBrickHTTPAuth < Test::Unit::TestCase
def test_basic_auth
diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb
index 6b0c419..e0c2ae3 100644
--- a/test/webrick/test_httpserver.rb
+++ b/test/webrick/test_httpserver.rb
@@ -1,7 +1,7 @@
require "test/unit"
require "net/http"
require "webrick"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
class TestWEBrickHTTPServer < Test::Unit::TestCase
def test_mount
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb
index eab7a5c..b688d52 100644
--- a/test/webrick/test_server.rb
+++ b/test/webrick/test_server.rb
@@ -1,7 +1,7 @@
require "test/unit"
require "tempfile"
require "webrick"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
class TestWEBrickServer < Test::Unit::TestCase
class Echo < WEBrick::GenericServer
diff --git a/test/xmlrpc/test_cookie.rb b/test/xmlrpc/test_cookie.rb
index c1be5c5..472027e 100644
--- a/test/xmlrpc/test_cookie.rb
+++ b/test/xmlrpc/test_cookie.rb
@@ -1,7 +1,7 @@
require 'test/unit'
require 'time'
require 'webrick'
-require File.join(File.dirname(__FILE__), 'webrick_testing')
+require_relative 'webrick_testing'
require "xmlrpc/server"
require 'xmlrpc/client'
diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb
index 192b5a7..8a37cde 100644
--- a/test/xmlrpc/test_webrick_server.rb
+++ b/test/xmlrpc/test_webrick_server.rb
@@ -1,6 +1,6 @@
require 'test/unit'
require 'webrick'
-require File.join(File.dirname(__FILE__), 'webrick_testing')
+require_relative 'webrick_testing'
require "xmlrpc/server"
require 'xmlrpc/client'