summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_install_update_options.rb
diff options
context:
space:
mode:
authorEllen Marie Dash <me@duckie.co>2023-09-28 22:30:18 -0400
committergit <svn-admin@ruby-lang.org>2023-10-11 19:07:27 +0000
commit225c05e3ec42a43ec21092017291ba24a51ccb15 (patch)
tree852b14335c75ebc3495b72bfec69877aa6c17ff6 /test/rubygems/test_gem_install_update_options.rb
parent262f345344e23fb6db45e3796d3f717f30207f9e (diff)
[rubygems/rubygems] Update tests to match new implementation of falling back to user-writable directories.
https://github.com/rubygems/rubygems/commit/a06e657ac6
Diffstat (limited to 'test/rubygems/test_gem_install_update_options.rb')
-rw-r--r--test/rubygems/test_gem_install_update_options.rb8
1 files 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