Skip to content

Commit 02b1884

Browse files
voxikdeivid-rodriguez
authored andcommitted
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.
1 parent 9281545 commit 02b1884

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/rubygems/test_gem_installer.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,8 +1987,9 @@ def test_process_options_fallback_to_user_install_when_gem_home_not_writable
19871987

19881988
FileUtils.chmod 0o000, @gemhome
19891989

1990-
use_ui(@ui) { Gem::Installer.at @gem }
1990+
installer = use_ui(@ui) { Gem::Installer.at @gem }
19911991

1992+
assert_equal Gem.user_dir, installer.gem_home
19921993
assert_equal "Defaulting to user installation because default installation directory (#{@gemhome}) is not writable.", @ui.output.strip
19931994
ensure
19941995
FileUtils.chmod 0o755, @gemhome

0 commit comments

Comments
 (0)