From 1fa5dd883e286a768a9dfa82ef3de562fcdabd01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 12 Dec 2023 14:37:30 +0100 Subject: [rubygems/rubygems] Test if the user dir is used for auto user installation This is mainly to align this test case with the `test_process_options_does_not_fallback_to_user_install_when_gem_home_ not_writable_and_no_user_install`, where the `install_dir` is checked already. https://github.com/rubygems/rubygems/commit/02b1884b61 --- test/rubygems/test_gem_installer.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 3110ac63a6..edcc2216bd 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1987,8 +1987,9 @@ end FileUtils.chmod 0o000, @gemhome - use_ui(@ui) { Gem::Installer.at @gem } + installer = use_ui(@ui) { Gem::Installer.at @gem } + assert_equal Gem.user_dir, installer.gem_home assert_equal "Defaulting to user installation because default installation directory (#{@gemhome}) is not writable.", @ui.output.strip ensure FileUtils.chmod 0o755, @gemhome -- cgit v1.2.3