mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc 3.5.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
918f625a5e
commit
cc2a16d94d
49 changed files with 2119 additions and 273 deletions
|
@ -6,25 +6,29 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|||
|
||||
def setup
|
||||
Rake::Task.clear
|
||||
|
||||
@t = RDoc::Task.new
|
||||
end
|
||||
|
||||
def test_clobber_task_description
|
||||
assert_equal 'Remove RDoc HTML files', @t.clobber_task_description
|
||||
end
|
||||
|
||||
def test_inline_source
|
||||
t = RDoc::Task.new
|
||||
|
||||
_, err = capture_io do
|
||||
assert t.inline_source
|
||||
assert @t.inline_source
|
||||
end
|
||||
|
||||
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
||||
|
||||
_, err = capture_io do
|
||||
t.inline_source = false
|
||||
@t.inline_source = false
|
||||
end
|
||||
|
||||
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
||||
|
||||
capture_io do
|
||||
assert t.inline_source
|
||||
assert @t.inline_source
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -51,6 +55,14 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|||
assert_equal %w[-o html -f ri], rdoc_task.option_list
|
||||
end
|
||||
|
||||
def test_rdoc_task_description
|
||||
assert_equal 'Build RDoc HTML files', @t.rdoc_task_description
|
||||
end
|
||||
|
||||
def test_rerdoc_task_description
|
||||
assert_equal 'Rebuild RDoc HTML files', @t.rerdoc_task_description
|
||||
end
|
||||
|
||||
def test_tasks_creation_with_custom_name_string
|
||||
rd = RDoc::Task.new("rdoc_dev")
|
||||
assert Rake::Task[:rdoc_dev]
|
||||
|
@ -60,7 +72,14 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_tasks_creation_with_custom_name_hash
|
||||
options = { :rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", :rerdoc => "rdoc:force" }
|
||||
options = {
|
||||
:rdoc => "rdoc",
|
||||
:clobber_rdoc => "rdoc:clean",
|
||||
:rerdoc => "rdoc:force"
|
||||
}
|
||||
|
||||
Rake::Task.clear
|
||||
|
||||
rd = RDoc::Task.new(options)
|
||||
assert Rake::Task[:"rdoc"]
|
||||
assert Rake::Task[:"rdoc:clean"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue