diff --git a/test/test_rdoc_rdoc.rb b/test/test_rdoc_rdoc.rb index 39f54555b5..be7a90c236 100644 --- a/test/test_rdoc_rdoc.rb +++ b/test/test_rdoc_rdoc.rb @@ -109,17 +109,18 @@ def load_options_no_file end def test_normalized_file_list + test_path = File.expand_path(__FILE__) files = temp_dir do |dir| flag_file = @rdoc.output_flag_file dir FileUtils.touch flag_file - @rdoc.normalized_file_list [__FILE__, flag_file] + @rdoc.normalized_file_list [test_path, flag_file] end files = files.map { |file| File.expand_path file } - assert_equal [File.expand_path(__FILE__)], files + assert_equal [test_path], files end def test_normalized_file_list_not_modified @@ -189,9 +190,10 @@ def test_parse_file_binary def test_parse_file_include_root @rdoc.store = RDoc::Store.new + test_path = File.expand_path('..', __FILE__) top_level = nil temp_dir do |dir| - @rdoc.options.parse %W[--root #{File.dirname(__FILE__)}] + @rdoc.options.parse %W[--root #{test_path}] open 'include.txt', 'w' do |io| io.puts ':include: test.txt'