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
@ -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>
|
Tue Dec 25 06:23:40 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* bootstraptest/test_knownbug.rb, test_literal.rb: move fixed test.
|
* bootstraptest/test_knownbug.rb, test_literal.rb: move fixed test.
|
||||||
|
@ -345,9 +345,15 @@ module Gem
|
|||||||
end
|
end
|
||||||
|
|
||||||
sitelibdir = ConfigMap[:sitelibdir]
|
sitelibdir = ConfigMap[:sitelibdir]
|
||||||
|
sitelibdir_index = $LOAD_PATH.index sitelibdir
|
||||||
|
|
||||||
# gem directories must come after -I and ENV['RUBYLIB']
|
if sitelibdir_index then
|
||||||
$:.insert($:.index(sitelibdir), *require_paths)
|
# 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
|
# Now autorequire
|
||||||
if autorequire && spec.autorequire then # DEPRECATED
|
if autorequire && spec.autorequire then # DEPRECATED
|
||||||
|
@ -280,7 +280,9 @@ class TestGem < RubyGemTestCase
|
|||||||
|
|
||||||
def test_self_prefix
|
def test_self_prefix
|
||||||
file_name = File.expand_path __FILE__
|
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
|
end
|
||||||
|
|
||||||
def test_self_required_location
|
def test_self_required_location
|
||||||
|
Loading…
x
Reference in New Issue
Block a user