1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Clear each test own temporary directories

This commit is contained in:
Nobuyoshi Nakada 2021-01-24 23:33:52 +09:00
parent 30f11e73c4
commit fd6d5c803a
Notes: git 2021-01-25 12:51:58 +09:00

View file

@ -301,9 +301,7 @@ class Gem::TestCase < Minitest::Test
def setup
@orig_env = ENV.to_hash
@tmp = File.expand_path("tmp")
FileUtils.mkdir_p @tmp
@tmp = Dir.mktmpdir("tmp", Dir.pwd)
ENV['GEM_VENDOR'] = nil
ENV['GEMRC'] = nil
@ -451,6 +449,7 @@ class Gem::TestCase < Minitest::Test
Dir.chdir @current_dir
FileUtils.rm_rf @tempdir
FileUtils.rm_rf @tmp
ENV.replace(@orig_env)