aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_cleanup_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-04 22:58:15 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-04 22:58:15 +0000
commitda9fe1c4528ef8b25f099345428a30b99bdf76ee (patch)
tree7aeee6685ce3535f6c15114bcd67b14d0a56ad84 /test/rubygems/test_gem_commands_cleanup_command.rb
parent1b82e0776c26136d5dd121e969d8d73d261cb42e (diff)
downloadruby-da9fe1c4528ef8b25f099345428a30b99bdf76ee.tar.gz
* lib/rubygems/commands/cleanup_command.rb: Clean all possible gems
using multiple passes. Fixes RubyGems bug #422. Refactored for maintainability. * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38698 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.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb
index 1bdfca0b0a..26b1fe7b0c 100644
--- a/test/rubygems/test_gem_commands_cleanup_command.rb
+++ b/test/rubygems/test_gem_commands_cleanup_command.rb
@@ -23,6 +23,21 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
refute_path_exists @a_1.gem_dir
end
+ def test_execute_all_dependencies
+ @b_1 = quick_spec 'b', 1 do |s| s.add_dependency 'a', '1' end
+ @b_2 = quick_spec 'b', 2 do |s| s.add_dependency 'a', '2' end
+
+ install_gem @b_1
+ install_gem @b_2
+
+ @cmd.options[:args] = []
+
+ @cmd.execute
+
+ refute_path_exists @a_1.gem_dir
+ refute_path_exists @b_1.gem_dir
+ end
+
def test_execute_all
gemhome2 = File.join @tempdir, 'gemhome2'