Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/test_rdoc_rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down