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:
parent
7ad94af99b
commit
9ca563978e
3 changed files with 17 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue