summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2023-10-23 16:19:59 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-11-08 09:04:28 +0900
commitbd5368fdec1109b3bf3dfa635f6ab1d60cfc5ddc (patch)
treef1c264c8629521dadd21e0d0e0f0323d70cf9ae9 /test
parentd0ad90df6863490a5f780c45e060ab859db228ba (diff)
[rubygems/rubygems] Don't use `util_installer` for user install
It is not nice to require install directory to be always specified, while this option is later ignored for user installed gems. Actually, the next step will be to remove `check_install_dir` check and let the install dir override the user install. https://github.com/rubygems/rubygems/commit/beb79e929f
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/installer_test_case.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/rubygems/installer_test_case.rb b/test/rubygems/installer_test_case.rb
index 705de6804e..dc978d06b0 100644
--- a/test/rubygems/installer_test_case.rb
+++ b/test/rubygems/installer_test_case.rb
@@ -111,7 +111,7 @@ class Gem::InstallerTestCase < Gem::TestCase
def setup_base_installer(force = true)
@gem = setup_base_gem
- util_installer @spec, @gemhome, false, force
+ util_installer @spec, @gemhome, force
end
##
@@ -163,7 +163,7 @@ class Gem::InstallerTestCase < Gem::TestCase
@user_gem = @user_spec.cache_file
- util_installer @user_spec, Gem.user_dir, :user
+ Gem::Installer.at @user_gem, :user_install => true
end
##
@@ -219,13 +219,11 @@ class Gem::InstallerTestCase < Gem::TestCase
end
##
- # Creates an installer for +spec+ that will install into +gem_home+. If
- # +user+ is true a user-install will be performed.
+ # Creates an installer for +spec+ that will install into +gem_home+.
- def util_installer(spec, gem_home, user=false, force=true)
+ def util_installer(spec, gem_home, force=true)
Gem::Installer.at(spec.cache_file,
:install_dir => gem_home,
- :user_install => user,
:force => force)
end