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
Родитель 7ad94af99b
Коммит 9ca563978e
3 изменённых файлов: 17 добавлений и 3 удалений

Просмотреть файл

@ -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.

Просмотреть файл

@ -345,9 +345,15 @@ module Gem
end
sitelibdir = ConfigMap[:sitelibdir]
sitelibdir_index = $LOAD_PATH.index sitelibdir
# gem directories must come after -I and ENV['RUBYLIB']
$:.insert($:.index(sitelibdir), *require_paths)
if sitelibdir_index then
# gem directories must come after -I and ENV['RUBYLIB']
$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

Просмотреть файл

@ -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