diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-01 09:52:39 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-01 09:52:39 +0000 |
commit | 4090ec1017d3b41a6589858f2f2be484a1d6d041 (patch) | |
tree | 03580876c8fab59c1eacab84bfee1fdec77cabb7 /test/rubygems | |
parent | 018d8261ce66724c16a9b91c70d71ce60ca6c6cf (diff) | |
download | ruby-4090ec1017d3b41a6589858f2f2be484a1d6d041.tar.gz |
* lib/rubygems/commands/cleanup_command.rb: Fix cleanup command for
multiple gems. [ruby-trunk - #7481] by Kouhei Sutou
* test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
* lib/rubygems.rb: Autoload Gem::Source to prevent test failures
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_commands_cleanup_command.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb index 2357999253..0cf2bd6291 100644 --- a/test/rubygems/test_gem_commands_cleanup_command.rb +++ b/test/rubygems/test_gem_commands_cleanup_command.rb @@ -24,6 +24,12 @@ class TestGemCommandsCleanupCommand < Gem::TestCase end def test_execute_all + gemhome2 = File.join @tempdir, 'gemhome2' + + Gem.ensure_gem_subdirectories gemhome2 + + Gem.use_paths @gemhome, gemhome2 + @b_1 = quick_spec 'b', 1 @b_2 = quick_spec 'b', 2 @@ -34,6 +40,9 @@ class TestGemCommandsCleanupCommand < Gem::TestCase @cmd.execute + assert_equal @gemhome, Gem.dir, 'GEM_HOME' + assert_equal [@gemhome, gemhome2], Gem.path.sort, 'GEM_PATH' + refute_path_exists @a_1.gem_dir refute_path_exists @b_1.gem_dir end |