diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-04 00:29:40 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-04 00:29:40 +0000 |
commit | 5a90f9e8f84533e7859232895fc4bbe6b31cc771 (patch) | |
tree | e15086587f691a1f5bd3c7ddbfa38e825828caf6 /test/rubygems/test_gem_commands_cleanup_command.rb | |
parent | f1321bd6e7c2d6b6a29a67074bad6f2742263921 (diff) |
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.1.
Please see entries of 2.6.0 and 2.6.1 on
https://github.com/rubygems/rubygems/blob/master/History.txt
[fix GH-1270] Patch by @segiddins
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_cleanup_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_cleanup_command.rb | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb index f988f81e55..8354160dbf 100644 --- a/test/rubygems/test_gem_commands_cleanup_command.rb +++ b/test/rubygems/test_gem_commands_cleanup_command.rb @@ -112,7 +112,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase @cmd.execute assert_path_exists @a_1.gem_dir - refute_path_exists @a_1_1.gem_dir + assert_path_exists @a_1_1.gem_dir ensure FileUtils.chmod 0755, @gemhome end unless win_platform? @@ -165,5 +165,33 @@ class TestGemCommandsCleanupCommand < Gem::TestCase assert_match %r%^Skipped default gems: b-2%, @ui.output assert_empty @ui.error end + + def test_execute_remove_gem_home_only + c_1, = util_gem 'c', '1' + c_2, = util_gem 'c', '2' + d_1, = util_gem 'd', '1' + d_2, = util_gem 'd', '2' + e_1, = util_gem 'e', '1' + e_2, = util_gem 'e', '2' + + c_1 = install_gem c_1, :user_install => true # pick up user install path + c_2 = install_gem c_2 + + d_1 = install_gem d_1 + d_2 = install_gem d_2, :user_install => true # pick up user install path + + e_1 = install_gem e_1 + e_2 = install_gem e_2 + + Gem::Specification.dirs = [Gem.dir, Gem.user_dir] + + @cmd.options[:args] = [] + + @cmd.execute + + assert_path_exists c_1.gem_dir + refute_path_exists d_1.gem_dir + refute_path_exists e_1.gem_dir + end end |