Skip to content

Commit 1f810c4

Browse files
committed
Added workaround for Ruby core repository.
Ruby core repository was different directory structure.
1 parent 435b719 commit 1f810c4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/test_rdoc_generator_json_index.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ def test_generate
9696
assert_file 'js/navigation.js'
9797
assert_file 'js/search_index.js'
9898

99-
orig_file = Pathname(File.join @pwd, 'lib/rdoc/generator/template/json_index/js/navigation.js')
99+
srcdir = File.expand_path("../../lib/rdoc", __FILE__)
100+
if !File.directory? srcdir
101+
# for Ruby core repository
102+
srcdir = File.expand_path("../../../lib/rdoc", __FILE__)
103+
end
104+
105+
orig_file = Pathname(File.join srcdir, 'generator/template/json_index/js/navigation.js')
100106
generated_file = Pathname(File.join @tmpdir, 'js/navigation.js')
101107

102108
# This is dirty hack on JRuby for MiniTest 4

0 commit comments

Comments
 (0)