diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-04 22:58:15 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-04 22:58:15 +0000 |
commit | da9fe1c4528ef8b25f099345428a30b99bdf76ee (patch) | |
tree | 7aeee6685ce3535f6c15114bcd67b14d0a56ad84 /test | |
parent | 1b82e0776c26136d5dd121e969d8d73d261cb42e (diff) | |
download | ruby-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')
-rw-r--r-- | test/rubygems/test_gem_commands_cleanup_command.rb | 15 |
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' |