File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,22 @@ def test_generator_option
6464 assert_equal %w[ -o html -f ri ] , rdoc_task . option_list
6565 end
6666
67+ def test_main_option
68+ rdoc_task = RDoc ::Task . new do |rd |
69+ rd . main = "README.md"
70+ end
71+
72+ assert_equal %w[ -o html --main README.md ] , rdoc_task . option_list
73+ end
74+
75+ def test_output_dir_option
76+ rdoc_task = RDoc ::Task . new do |rd |
77+ rd . rdoc_dir = "zomg"
78+ end
79+
80+ assert_equal %w[ -o zomg ] , rdoc_task . option_list
81+ end
82+
6783 def test_rdoc_task_description
6884 assert_equal 'Build RDoc HTML files' , @t . rdoc_task_description
6985 end
@@ -116,5 +132,21 @@ def test_tasks_creation_with_custom_name_hash_raises_exception_if_invalid_option
116132 end
117133 end
118134
135+ def test_template_option
136+ rdoc_task = RDoc ::Task . new do |rd |
137+ rd . template = "foo"
138+ end
139+
140+ assert_equal %w[ -o html -T foo ] , rdoc_task . option_list
141+ end
142+
143+ def test_title_option
144+ rdoc_task = RDoc ::Task . new do |rd |
145+ rd . title = "Test Title Option"
146+ end
147+
148+ assert_equal %w[ -o html ] << "--title" << "Test Title Option" , rdoc_task . option_list
149+ end
150+
119151end
120152
You can’t perform that action at this time.
0 commit comments