Skip to content

Commit

Permalink
Test if the user dir is used for auto user installation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
voxik authored and deivid-rodriguez committed Dec 12, 2023
1 parent 9281545 commit 02b1884
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/rubygems/test_gem_installer.rb
Original file line number Diff line number Diff line change
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 02b1884

Please sign in to comment.