Skip to content

Commit

Permalink
Revert "Revert rubygems tempdir check"
Browse files Browse the repository at this point in the history
This reverts commit 6aa5067.
  • Loading branch information
hsbt committed Feb 26, 2024
1 parent 4591989 commit 91ec1fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/rubygems/helper.rb
Expand Up @@ -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
Expand Down Expand Up @@ -287,7 +289,8 @@ def setup

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
Expand Down Expand Up @@ -471,6 +474,8 @@ def teardown
end

@back_ui.close

assert_empty @@tempdirs.select {|tempdir| File.exist?(tempdir) }
end

def credential_setup
Expand Down

0 comments on commit 91ec1fc

Please sign in to comment.