Fix failures of test/rdoc/test_rdoc_ri_paths.rb

yield `home_dir` when HOMEDIR is not falsy only.
d0f41aa238/lib/rdoc/ri/paths.rb (L43)
```
    yield home_dir,    :home   if home and HOMEDIR
```

https://rubyci.org/logs/rubyci.s3.amazonaws.com/archlinux/ruby-master/log/20200426T033503Z.fail.html.gz
```
  1) Failure:
TestRDocRIPaths#test_class_each [/home/chkbuild/build/20200426T033503Z/ruby/test/rdoc/test_rdoc_ri_paths.rb:54]:
<nil> expected but was
<"/home/naruse/chkbuild/tmp/build/20200426T033503Z/tmp/test_rdoc_ri_paths_1033468/doc/nodoc-1.0/ri">.

  2) Failure:
TestRDocRIPaths#test_class_raw_path [/home/chkbuild/build/20200426T033503Z/ruby/test/rdoc/test_rdoc_ri_paths.rb:131]:
<nil> expected but was
<"/home/naruse/chkbuild/tmp/build/20200426T033503Z/tmp/test_rdoc_ri_paths_1033468/doc/rake-10.0.1/ri">.

  3) Failure:
TestRDocRIPaths#test_class_raw_path_extra_dirs [/home/chkbuild/build/20200426T033503Z/ruby/test/rdoc/test_rdoc_ri_paths.rb:141]:
<nil> expected but was
<"/home/naruse/chkbuild/tmp/build/20200426T033503Z/tmp/test_rdoc_ri_paths_1033468/doc/rake-10.0.1/ri">.
```
This commit is contained in:
Kazuhiro NISHIYAMA 2020-04-26 16:14:14 +09:00
Родитель d0f41aa238
Коммит 36ed700711
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 262ED8DBB4222F7A
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -51,7 +51,7 @@ class TestRDocRIPaths < RDoc::TestCase
assert_equal RDoc::RI::Paths.system_dir, path.shift
assert_equal RDoc::RI::Paths.site_dir, path.shift
assert_equal RDoc::RI::Paths.home_dir, path.shift
assert_equal RDoc::RI::Paths.home_dir, path.shift if RDoc::RI::Paths.home_dir
assert_equal File.join(@nodoc.doc_dir, 'ri'), path.shift
assert_equal File.join(@rake_10.doc_dir, 'ri'), path.shift
assert_equal File.join(@rdoc_4_0.doc_dir, 'ri'), path.shift
@ -128,7 +128,7 @@ class TestRDocRIPaths < RDoc::TestCase
assert_equal RDoc::RI::Paths.system_dir, path.shift
assert_equal RDoc::RI::Paths.site_dir, path.shift
assert_equal RDoc::RI::Paths.home_dir, path.shift
assert_equal RDoc::RI::Paths.home_dir, path.shift if RDoc::RI::Paths.home_dir
assert_equal File.join(@rake_10.doc_dir, 'ri'), path.shift
end
@ -138,7 +138,7 @@ class TestRDocRIPaths < RDoc::TestCase
assert_equal '/nonexistent', path.shift
assert_equal RDoc::RI::Paths.system_dir, path.shift
assert_equal RDoc::RI::Paths.site_dir, path.shift
assert_equal RDoc::RI::Paths.home_dir, path.shift
assert_equal RDoc::RI::Paths.home_dir, path.shift if RDoc::RI::Paths.home_dir
assert_equal File.join(@rake_10.doc_dir, 'ri'), path.shift
end