Skip to content

Commit

Permalink
[rubygems/rubygems] Check for :install_dir precedence over `:user_i…
Browse files Browse the repository at this point in the history
  • Loading branch information
voxik authored and hsbt committed Nov 8, 2023
1 parent 42cf130 commit d0ad90d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/rubygems/test_gem_installer.rb
Expand Up @@ -995,6 +995,19 @@ def test_initialize_user_install_bin_dir
assert_equal @tempdir, installer.bin_dir
end

def test_install_dir_takes_precedence_to_user_install
gemhome2 = "#{@gemhome}2"

@gem = setup_base_gem

installer =
Gem::Installer.at @gem, :install_dir => gemhome2, :user_install => true
installer.install

assert_path_exist File.join(gemhome2, "gems", @spec.full_name)
assert_path_not_exist File.join(Gem.user_dir, "gems", @spec.full_name)
end

def test_install
installer = util_setup_installer

Expand Down

0 comments on commit d0ad90d

Please sign in to comment.