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

Fix some test failures in RubyGems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2007-12-24 23:28:35 +00:00
parent 7ad94af99b
commit 9ca563978e
3 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,9 @@
Tue Dec 25 08:27:43 2007 Eric Hodel <drbrain@segment7.net>
* lib/rubygems.rb: Fix test failures.
* test/rubygems/test_gem.rb: Fix test failure.
Tue Dec 25 06:23:40 2007 Koichi Sasada <ko1@atdot.net>
* bootstraptest/test_knownbug.rb, test_literal.rb: move fixed test.

View file

@ -345,9 +345,15 @@ module Gem
end
sitelibdir = ConfigMap[:sitelibdir]
sitelibdir_index = $LOAD_PATH.index sitelibdir
if sitelibdir_index then
# gem directories must come after -I and ENV['RUBYLIB']
$:.insert($:.index(sitelibdir), *require_paths)
$LOAD_PATH.insert(sitelibdir_index, *require_paths)
else
# we are probably testing in core, -I and RUBYLIB don't apply
$LOAD_PATH.unshift(*require_paths)
end
# Now autorequire
if autorequire && spec.autorequire then # DEPRECATED

View file

@ -280,7 +280,9 @@ class TestGem < RubyGemTestCase
def test_self_prefix
file_name = File.expand_path __FILE__
assert_equal File.dirname(File.dirname(file_name)), Gem.prefix
expected = File.dirname File.dirname(file_name)
expected = File.dirname expected if expected =~ %r|/test| # for Ruby trunk
assert_equal expected, Gem.prefix
end
def test_self_required_location