[rubygems/rubygems] Disable side-effect of GEM_HOME configuration

c43328ab03
This commit is contained in:
Hiroshi SHIBATA 2023-03-10 10:06:49 +09:00 committed by git
parent 65f2563551
commit f1c9f89ff8
2 changed files with 10 additions and 0 deletions

View file

@ -1464,6 +1464,9 @@ class TestGem < Gem::TestCase
end
def test_load_user_installed_plugins
@orig_gem_home = ENV['GEM_HOME']
ENV['GEM_HOME'] = @gemhome
plugin_path = File.join "lib", "rubygems_plugin.rb"
Dir.chdir @tempdir do
@ -1486,6 +1489,8 @@ class TestGem < Gem::TestCase
Gem.load_plugins
assert_equal %w[plugin], PLUGINS_LOADED
ensure
ENV['GEM_HOME'] = @orig_gem_home
end
def test_load_env_plugins