summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-01-12 20:15:18 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-01-12 20:15:18 +0900
commit0dc95266e8c36dbc3bfdcb88d820cb7f897166d7 (patch)
treec4938f1a76c380268967c80f0c1592a7701df302 /test/irb
parent7dc0511ea4be210f82abb1c82a31aec3a4fe5736 (diff)
Fix the failing test with XDG_CONFIG_HOME
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_init.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb
index b51d010..83b4b5a 100644
--- a/test/irb/test_init.rb
+++ b/test/irb/test_init.rb
@@ -21,6 +21,7 @@ module TestIRB
def test_rc_file
backup_irbrc = ENV.delete("IRBRC") # This is for RVM...
+ backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
backup_home = ENV["HOME"]
Dir.mktmpdir("test_irb_init_#{$$}") do |tmpdir|
ENV["HOME"] = tmpdir
@@ -35,11 +36,13 @@ module TestIRB
end
ensure
ENV["HOME"] = backup_home
+ ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home
ENV["IRBRC"] = backup_irbrc
end
def test_rc_file_in_subdir
backup_irbrc = ENV.delete("IRBRC") # This is for RVM...
+ backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
backup_home = ENV["HOME"]
Dir.mktmpdir("test_irb_init_#{$$}") do |tmpdir|
ENV["HOME"] = tmpdir
@@ -57,6 +60,7 @@ module TestIRB
end
ensure
ENV["HOME"] = backup_home
+ ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home
ENV["IRBRC"] = backup_irbrc
end