diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-02-26 15:27:26 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-02-26 15:27:26 +0900 |
commit | 91ec1fc4e79d0070a029e6bd006afe04cdf26c9f (patch) | |
tree | e273af42e55a1373ae1720c39e032cfa68f0e8cb /test | |
parent | 459198999e57652e32817b566ad47443f4bbcedc (diff) |
Revert "Revert rubygems tempdir check"
This reverts commit 6aa5067ab970e70693529cde5102fab587158f7f.
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/helper.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index b917e1f396..c33d1bba21 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -76,6 +76,8 @@ class Gem::TestCase < Test::Unit::TestCase attr_accessor :uri # :nodoc: + @@tempdirs = [] + def assert_activate(expected, *specs) specs.each do |spec| case spec @@ -287,7 +289,8 @@ class Gem::TestCase < Test::Unit::TestCase FileUtils.mkdir_p @tmp - @tempdir = Dir.mktmpdir("test_rubygems_", @tmp) + @tempdir = Dir.mktmpdir(method_name.to_s, @tmp) + @@tempdirs << @tempdir ENV["GEM_VENDOR"] = nil ENV["GEMRC"] = nil @@ -471,6 +474,8 @@ class Gem::TestCase < Test::Unit::TestCase end @back_ui.close + + assert_empty @@tempdirs.select {|tempdir| File.exist?(tempdir) } end def credential_setup |