summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_uninstall_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-26 20:24:51 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-26 20:24:51 +0000
commite487a7f53cffbadf0bf15ff169c9cb5898503250 (patch)
treeeaa80eb4ced6fcdcc8b327d1cc5e47f66703fd1b /test/rubygems/test_gem_commands_uninstall_command.rb
parentcddd93a57568966b416e300529bdffc0c7e87b51 (diff)
* lib/rubygems: Import RubyGems 2.1.0 Release Candidate
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_uninstall_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index 5a11948ee6..9ba1371b79 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -191,21 +191,30 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
end
def test_execute_all
- ui = Gem::MockGemUi.new "y\n"
-
util_make_gems
- util_setup_gem ui
- assert Gem::Specification.find_all_by_name('a').length > 1
+ default = new_default_spec 'default', '1'
+ install_default_gems default
+
+ gemhome2 = "#{@gemhome}2"
+
+ a_4 = quick_spec 'a', 4
+ install_gem a_4, :install_dir => gemhome2
+
+ Gem::Specification.dirs = [@gemhome, gemhome2]
+
+ assert_includes Gem::Specification.all_names, 'a-1'
+ assert_includes Gem::Specification.all_names, 'a-4'
+ assert_includes Gem::Specification.all_names, 'default-1'
@cmd.options[:all] = true
@cmd.options[:args] = []
- use_ui ui do
+ use_ui @ui do
@cmd.execute
end
- refute_includes Gem::Specification.all_names, 'a'
+ assert_equal %w[a-4 default-1], Gem::Specification.all_names.sort
end
end