Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions lib/rdoc/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class RDoc::Task < Rake::TaskLib
attr_accessor :markup

##
# Name of directory to receive the html output files. (default is "doc")
# Name of directory to receive the html output files. (default is "html")

attr_accessor :rdoc_dir

Expand Down Expand Up @@ -192,7 +192,7 @@ def clobber_task_description
def defaults
@name = :rdoc
@rdoc_files = Rake::FileList.new
@rdoc_dir = 'doc'
@rdoc_dir = 'html'
@main = nil
@title = nil
@template = nil
Expand Down
14 changes: 7 additions & 7 deletions test/test_rdoc_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ def test_markup_option
rd.markup = "tomdoc"
end

assert_equal %w[-o doc --markup tomdoc], rdoc_task.option_list
assert_equal %w[-o html --markup tomdoc], rdoc_task.option_list
end

def test_tasks_creation
RDoc::Task.new
assert Rake::Task[:rdoc]
assert Rake::Task[:clobber_rdoc]
assert Rake::Task[:rerdoc]
assert_equal ["doc/created.rid"], Rake::Task[:rdoc].prerequisites
assert_equal ["html/created.rid"], Rake::Task[:rdoc].prerequisites
end

def test_tasks_creation_with_custom_name_symbol
Expand All @@ -73,7 +73,7 @@ def test_tasks_option_parser
assert rdoc_task.rdoc_files.include?("README.md")
assert rdoc_task.options.include?("--all")

args = %w[--all -o doc --main README.md] << "--title" << "Test Tasks Option Parser" << "README.md"
args = %w[--all -o html --main README.md] << "--title" << "Test Tasks Option Parser" << "README.md"
assert_equal args, rdoc_task.option_list + rdoc_task.rdoc_files
end

Expand All @@ -82,15 +82,15 @@ def test_generator_option
rd.generator = "ri"
end

assert_equal %w[-o doc -f ri], rdoc_task.option_list
assert_equal %w[-o html -f ri], rdoc_task.option_list
end

def test_main_option
rdoc_task = RDoc::Task.new do |rd|
rd.main = "README.md"
end

assert_equal %w[-o doc --main README.md], rdoc_task.option_list
assert_equal %w[-o html --main README.md], rdoc_task.option_list
end

def test_output_dir_option
Expand Down Expand Up @@ -158,15 +158,15 @@ def test_template_option
rd.template = "foo"
end

assert_equal %w[-o doc -T foo], rdoc_task.option_list
assert_equal %w[-o html -T foo], rdoc_task.option_list
end

def test_title_option
rdoc_task = RDoc::Task.new do |rd|
rd.title = "Test Title Option"
end

assert_equal %w[-o doc] << "--title" << "Test Title Option", rdoc_task.option_list
assert_equal %w[-o html] << "--title" << "Test Title Option", rdoc_task.option_list
end

end if defined?(Rake::Task)
Expand Down