Skip to content

Commit

Permalink
Use temporary cache dir for XDG configuration of RubyGems tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 15, 2024
1 parent dde21a7 commit 8dfa5b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/rubygems/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def setup

@gemhome = File.join @tempdir, "gemhome"
@userhome = File.join @tempdir, "userhome"
@cachehome = File.join @tempdir, "cachehome"
@statehome = File.join @tempdir, "statehome"
ENV["GEM_SPEC_CACHE"] = File.join @tempdir, "spec_cache"

Expand Down Expand Up @@ -353,6 +354,7 @@ def setup
Gem.instance_variable_set :@user_home, nil
Gem.instance_variable_set :@config_home, nil
Gem.instance_variable_set :@data_home, nil
Gem.instance_variable_set :@cache_home, @cachehome
Gem.instance_variable_set :@state_home, @statehome
Gem.instance_variable_set :@gemdeps, nil
Gem.instance_variable_set :@env_requirements_by_name, nil
Expand Down

0 comments on commit 8dfa5b1

Please sign in to comment.