Bug #4407: rubygems test should use require_relative
http://redmine.ruby-lang.org/issues/show/4407

Author: Shota Fukumori
Status: Assigned, Priority: Normal
Assigned to: Ryan Davis, Category: test
ruby -v: ruby 1.9.3dev (2011-02-15 trunk 30885) [x86_64-darwin10.6.0]

hi,

rubygem's some tests should use require_relative.

Patch is here

diff --git test/rubygems/test_gem_format.rb test/rubygems/test_gem_format.rb
index f964cab..b808398 100644
--- test/rubygems/test_gem_format.rb
+++ test/rubygems/test_gem_format.rb
@@ -5,7 +5,11 @@
 ######################################################################
 
 require 'rubygems/package/tar_test_case'
-require 'test/rubygems/simple_gem'
+if respond_to?(:require_relative)
+  require_relative 'simple_gem'
+else
+  require "#{File.dirname(__FILE__)}/simple_gem"
+end
 require 'rubygems/format'
 
 class TestGemFormat < Gem::Package::TarTestCase
diff --git test/rubygems/test_gem_validator.rb test/rubygems/test_gem_validator.rb
index aa4bd38..97491bf 100644
--- test/rubygems/test_gem_validator.rb
+++ test/rubygems/test_gem_validator.rb
@@ -5,7 +5,11 @@
 ######################################################################
 
 require 'rubygems/test_case'
-require "test/rubygems/simple_gem"
+if respond_to?(:require_relative)
+  require_relative 'simple_gem'
+else
+  require "#{File.dirname(__FILE__)}/simple_gem"
+end
 require 'rubygems/validator'
 
 class TestGemValidator < Gem::TestCase


----------------------------------------
http://redmine.ruby-lang.org