aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-26 01:10:50 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-26 01:10:50 +0000
commite93d882d96cc536857e6c181b5f0194f15316b7d (patch)
treed5810ac15991fc2d4eeb19138e49ba4b892e866d /test/rubygems/test_gem.rb
parent4544b3824c8ce74e0a92c58a3167f900904f506b (diff)
downloadruby-e93d882d96cc536857e6c181b5f0194f15316b7d.tar.gz
* lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue in
creating ruby-format gemspecs. Fixes Gem.dir not being at the front of Gem.path to fix uninstall and cleanup commands. Fixes gem uninstall stopping on the first missing gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r--test/rubygems/test_gem.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 273ba8f640..bbb61bfa49 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -733,7 +733,7 @@ class TestGem < Gem::TestCase
Gem.instance_variable_set :@paths, nil
- assert_equal [Gem.default_path, Gem.dir].flatten.uniq, Gem.path
+ assert_equal [Gem.dir, *Gem.default_path].uniq, Gem.path
ensure
Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME if orig_APPLE_GEM_HOME
end
@@ -772,11 +772,10 @@ class TestGem < Gem::TestCase
ENV['GEM_PATH'] = @additional.join(File::PATH_SEPARATOR)
- assert_equal @additional, Gem.path[0,2]
+ assert_equal [Gem.dir, *@additional], Gem.path
assert_equal path_count + @additional.size, Gem.path.size,
"extra path components: #{Gem.path[2..-1].inspect}"
- assert_equal Gem.dir, Gem.path.last
end
def test_self_path_duplicate
@@ -789,8 +788,7 @@ class TestGem < Gem::TestCase
assert_equal @gemhome, Gem.dir
- paths = [Gem.dir]
- assert_equal @additional + paths, Gem.path
+ assert_equal [Gem.dir, *@additional], Gem.path
end
def test_self_path_overlap
@@ -802,8 +800,7 @@ class TestGem < Gem::TestCase
assert_equal @gemhome, Gem.dir
- paths = [Gem.dir]
- assert_equal @additional + paths, Gem.path
+ assert_equal [Gem.dir, *@additional], Gem.path
end
def test_self_platforms
@@ -923,7 +920,7 @@ class TestGem < Gem::TestCase
ENV["GEM_HOME"] = @gemhome
Gem.paths = { "GEM_PATH" => path }
- assert_equal [@userhome, other, @gemhome], Gem.path
+ assert_equal [@gemhome, @userhome, other], Gem.path
end
def test_self_paths_eq_nonexistent_home
@@ -936,7 +933,7 @@ class TestGem < Gem::TestCase
Gem.paths = { "GEM_PATH" => other }
- assert_equal [other, @gemhome], Gem.path
+ assert_equal [@gemhome, other], Gem.path
end
def test_self_source_index
@@ -983,7 +980,7 @@ class TestGem < Gem::TestCase
Gem.use_paths @gemhome, @additional
assert_equal @gemhome, Gem.dir
- assert_equal @additional + [Gem.dir], Gem.path
+ assert_equal [Gem.dir, *@additional], Gem.path
end
def test_self_user_dir