From 225c05e3ec42a43ec21092017291ba24a51ccb15 Mon Sep 17 00:00:00 2001 From: Ellen Marie Dash Date: Thu, 28 Sep 2023 22:30:18 -0400 Subject: [PATCH] [rubygems/rubygems] Update tests to match new implementation of falling back to user-writable directories. https://github.com/rubygems/rubygems/commit/a06e657ac6 --- test/rubygems/test_gem_install_update_options.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb index fd1077faa5..30ad370510 100644 --- a/test/rubygems/test_gem_install_update_options.rb +++ b/test/rubygems/test_gem_install_update_options.rb @@ -159,9 +159,9 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase FileUtils.chmod 0o755, @gemhome end - def test_auto_user_install_unless_gem_home_writable + def test_auto_install_dir_unless_gem_home_writable if Process.uid.zero? - pend("test_auto_user_install_unless_gem_home_writable test skipped in root privilege") + pend("test_auto_install_dir_unless_gem_home_writable test skipped in root privilege") return end @@ -174,14 +174,14 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase @cmd.handle_options %w[] - refute @cmd.options[:user_install] + assert_not_equal Gem.paths.home, Gem.user_dir FileUtils.chmod 0o755, @userhome FileUtils.chmod 0o000, @gemhome Gem.use_paths @gemhome, @userhome - @cmd.install_update_options.include?(:user_install) + assert_equal Gem.paths.home, Gem.user_dir ensure FileUtils.chmod 0o755, @gemhome end