summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_init.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb
index 074aae4070..39c5cfa8a0 100644
--- a/test/irb/test_init.rb
+++ b/test/irb/test_init.rb
@@ -36,13 +36,16 @@ module TestIRB
def test_rc_file
tmpdir = @tmpdir
Dir.chdir(tmpdir) do
+ ENV["XDG_CONFIG_HOME"] = "#{tmpdir}/xdg"
IRB.conf[:RC_NAME_GENERATOR] = nil
assert_equal(tmpdir+"/.irb#{IRB::IRBRC_EXT}", IRB.rc_file)
assert_equal(tmpdir+"/.irb_history", IRB.rc_file("_history"))
+ assert_file.not_exist?(tmpdir+"/xdg")
IRB.conf[:RC_NAME_GENERATOR] = nil
FileUtils.touch(tmpdir+"/.irb#{IRB::IRBRC_EXT}")
assert_equal(tmpdir+"/.irb#{IRB::IRBRC_EXT}", IRB.rc_file)
assert_equal(tmpdir+"/.irb_history", IRB.rc_file("_history"))
+ assert_file.not_exist?(tmpdir+"/xdg")
end
end