From da9fe1c4528ef8b25f099345428a30b99bdf76ee Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 4 Jan 2013 22:58:15 +0000 Subject: * 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 --- test/rubygems/test_gem_commands_cleanup_command.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') 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' -- cgit v1.2.3