Skip to content

Commit

Permalink
[rubygems/rubygems] Test if the user dir is used for auto user instal…
Browse files Browse the repository at this point in the history
…lation

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.

rubygems/rubygems@02b1884b61
  • Loading branch information
voxik authored and hsbt committed Dec 13, 2023
1 parent 402fd96 commit 1fa5dd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/rubygems/test_gem_installer.rb
Expand Up @@ -1987,8 +1987,9 @@ def test_process_options_fallback_to_user_install_when_gem_home_not_writable

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
Expand Down

0 comments on commit 1fa5dd8

Please sign in to comment.