summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_store.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_store.rb')
-rw-r--r--test/rdoc/test_rdoc_store.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_store.rb b/test/rdoc/test_rdoc_store.rb
index 8332d9233ed..076b8e7d4e4 100644
--- a/test/rdoc/test_rdoc_store.rb
+++ b/test/rdoc/test_rdoc_store.rb
@@ -317,6 +317,9 @@ class TestRDocStore < XrefTestCase
end
def test_friendly_path
+ @orig_xdg_data_home = ENV['XDG_DATA_HOME']
+ ENV.delete('XDG_DATA_HOME')
+
@s.path = @tmpdir
@s.type = nil
assert_equal @s.path, @s.friendly_path
@@ -331,11 +334,13 @@ class TestRDocStore < XrefTestCase
assert_equal "ruby site", @s.friendly_path
@s.type = :home
- assert_equal "~/.rdoc", @s.friendly_path
+ assert_equal File.expand_path("~/.local/share/rdoc"), @s.friendly_path
@s.type = :gem
@s.path = "#{@tmpdir}/gem_repository/doc/gem_name-1.0/ri"
assert_equal "gem gem_name-1.0", @s.friendly_path
+ ensure
+ ENV['XDG_DATA_HOME'] = @orig_xdg_data_home
end
def test_dry_run