summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_uninstaller.rb
diff options
context:
space:
mode:
authorJared Beck <jared@jaredbeck.com>2021-07-08 11:27:50 -0400
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-07-16 15:40:07 +0900
commitbbaebbf5290adcbbfe30bbd925c2bf85ce190f52 (patch)
treee3ef7938b35b089b0bb7f5c56caa64d52e7d929c /test/rubygems/test_gem_uninstaller.rb
parent29ed9d1aaaad576f18b771aee9a183750ba37070 (diff)
[rubygems/rubygems] Fix contradictory message about deletion of default gem
[Fixes #4733] https://github.com/rubygems/rubygems/commit/fce7f3eb7d
Diffstat (limited to 'test/rubygems/test_gem_uninstaller.rb')
-rw-r--r--test/rubygems/test_gem_uninstaller.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb
index a002c0c7c8..9e18972864 100644
--- a/test/rubygems/test_gem_uninstaller.rb
+++ b/test/rubygems/test_gem_uninstaller.rb
@@ -295,8 +295,15 @@ class TestGemUninstaller < Gem::InstallerTestCase
uninstaller = Gem::Uninstaller.new spec.name, :executables => true
- uninstaller.uninstall
-
+ ui = Gem::MockGemUi.new "1\ny\n"
+ use_ui ui do
+ uninstaller.uninstall
+ end
+ expected = "Successfully uninstalled default-2\n" \
+ "There was both a regular copy and a default copy of default-2. The " \
+ "regular copy was successfully uninstalled, but the default copy " \
+ "was left around because default gems can't be removed.\n"
+ assert_equal expected, ui.output
assert_path_not_exist spec.gem_dir
end