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:
parent
30f11e73c4
commit
fd6d5c803a
Notes:
git
2021-01-25 12:51:58 +09:00
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue