mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc 3.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90d5bcf910
commit
e2efe8e81d
28 changed files with 494 additions and 56 deletions
|
@ -8,6 +8,26 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|||
Rake::Task.clear
|
||||
end
|
||||
|
||||
def test_inline_source
|
||||
t = RDoc::Task.new
|
||||
|
||||
_, err = capture_io do
|
||||
assert t.inline_source
|
||||
end
|
||||
|
||||
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
||||
|
||||
_, err = capture_io do
|
||||
t.inline_source = false
|
||||
end
|
||||
|
||||
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
||||
|
||||
capture_io do
|
||||
assert t.inline_source
|
||||
end
|
||||
end
|
||||
|
||||
def test_tasks_creation
|
||||
RDoc::Task.new
|
||||
assert Rake::Task[:rdoc]
|
||||
|
@ -23,6 +43,14 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|||
assert_equal :rdoc_dev, rd.name
|
||||
end
|
||||
|
||||
def test_generator_option
|
||||
rdoc_task = RDoc::Task.new do |rd|
|
||||
rd.generator = "ri"
|
||||
end
|
||||
|
||||
assert_equal %w[-o html -f ri], rdoc_task.option_list
|
||||
end
|
||||
|
||||
def test_tasks_creation_with_custom_name_string
|
||||
rd = RDoc::Task.new("rdoc_dev")
|
||||
assert Rake::Task[:rdoc_dev]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue