diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-11 12:12:13 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-15 19:48:25 +0900 |
commit | c3ecd1cbd37db93fe181f00dd0c43059d2f3fcec (patch) | |
tree | 4d8160c2d2189e33c601048d0e050ec07a30d37a /lib/rubygems | |
parent | 3a2628025ed82b833483e8c42e08a0f7d12668ad (diff) |
Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""
This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3211
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/test_case.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index fef9540264..2c1b08c514 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -356,12 +356,7 @@ class Gem::TestCase < Minitest::Test Dir.chdir @tempdir ENV['HOME'] = @userhome - FileUtils.mkdir_p File.join(@userhome, ".gem") - File.write File.join(@userhome, ".gemrc"), "--- {}" - Gem.instance_variable_set :@user_home, nil - Gem.instance_variable_set :@cache_home, nil - Gem.instance_variable_set :@data_home, nil Gem.instance_variable_set :@gemdeps, nil Gem.instance_variable_set :@env_requirements_by_name, nil Gem.send :remove_instance_variable, :@ruby_version if @@ -482,6 +477,10 @@ class Gem::TestCase < Minitest::Test File.chmod 0600, @temp_cred end + def credential_teardown + FileUtils.rm_rf @temp_cred + end + def common_installer_setup common_installer_teardown |