Skip to content

Commit

Permalink
Revert rubygems tempdir check
Browse files Browse the repository at this point in the history
This check was added to check if other tests still remain tempdir, and these tests do on Windows.

* `TestGemCommandsSetupCommand#test_destdir_flag_does_not_try_to_write_to_the_default_gem_home`
* `TestGemInstaller#test_install_build_root_when_gem_home_not_writable_does_not_fallback_to_user_install_inside_build_root`

Also some tests fail due to too long path names.
  • Loading branch information
nobu committed Feb 21, 2024
1 parent b1431ce commit 6aa5067
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions test/rubygems/helper.rb
Expand Up @@ -76,8 +76,6 @@ 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 @@ -289,8 +287,7 @@ def setup

FileUtils.mkdir_p @tmp

@tempdir = Dir.mktmpdir(method_name.to_s, @tmp)
@@tempdirs << @tempdir
@tempdir = Dir.mktmpdir("test_rubygems_", @tmp)

ENV["GEM_VENDOR"] = nil
ENV["GEMRC"] = nil
Expand Down Expand Up @@ -474,8 +471,6 @@ def teardown
end

@back_ui.close

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

def credential_setup
Expand Down

0 comments on commit 6aa5067

Please sign in to comment.