Fix the failing test with XDG_CONFIG_HOME
This commit is contained in:
parent
7dc0511ea4
commit
0dc95266e8
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user