Skip to content

Commit fe99faf

Browse files
hsbtaycabta
authored andcommitted
Fix the failing test with XDG_CONFIG_HOME
1 parent 1a1cdf9 commit fe99faf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/irb/test_init.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def test_setup_with_minimum_argv_does_not_change_dollar0
2121

2222
def test_rc_file
2323
backup_irbrc = ENV.delete("IRBRC") # This is for RVM...
24+
backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
2425
backup_home = ENV["HOME"]
2526
Dir.mktmpdir("test_irb_init_#{$$}") do |tmpdir|
2627
ENV["HOME"] = tmpdir
@@ -35,11 +36,13 @@ def test_rc_file
3536
end
3637
ensure
3738
ENV["HOME"] = backup_home
39+
ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home
3840
ENV["IRBRC"] = backup_irbrc
3941
end
4042

4143
def test_rc_file_in_subdir
4244
backup_irbrc = ENV.delete("IRBRC") # This is for RVM...
45+
backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
4346
backup_home = ENV["HOME"]
4447
Dir.mktmpdir("test_irb_init_#{$$}") do |tmpdir|
4548
ENV["HOME"] = tmpdir
@@ -57,6 +60,7 @@ def test_rc_file_in_subdir
5760
end
5861
ensure
5962
ENV["HOME"] = backup_home
63+
ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home
6064
ENV["IRBRC"] = backup_irbrc
6165
end
6266

0 commit comments

Comments
 (0)