aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_uninstaller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_uninstaller.rb')
-rw-r--r--test/rubygems/test_gem_uninstaller.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb
index a94fc43ff9..aecc4e3807 100644
--- a/test/rubygems/test_gem_uninstaller.rb
+++ b/test/rubygems/test_gem_uninstaller.rb
@@ -94,7 +94,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
exec_path = File.join Gem.user_dir, 'bin', 'foo-executable-bar'
assert_equal false, File.exist?(exec_path), 'removed exec from bin dir'
- assert_equal "Removing executable\n", @ui.output
+ assert_equal "Removing foo-executable-bar\n", @ui.output
ensure
Gem::Installer.exec_format = nil
end
@@ -158,6 +158,16 @@ class TestGemUninstaller < Gem::InstallerTestCase
assert_same uninstaller, @post_uninstall_hook_arg
end
+ def test_uninstall_nonexistent
+ uninstaller = Gem::Uninstaller.new 'bogus', :executables => true
+
+ e = assert_raises Gem::InstallError do
+ uninstaller.uninstall
+ end
+
+ assert_equal 'gem "bogus" is not installed', e.message
+ end
+
def test_uninstall_not_ok
quick_gem 'z' do |s|
s.add_runtime_dependency @spec.name