Project

General

Profile

Actions

Bug #4407

closed

rubygems test should use require_relative

Added by sorah (Sorah Fukumori) almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-02-15 trunk 30885) [x86_64-darwin10.6.0]
Backport:
[ruby-core:35285]

Description

=begin
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
=end


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #4395: Can't require test/rubygems/simple_gem when tests run in different directoryCloseddrbrain (Eric Hodel)02/14/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0