Skip to content

Commit 0d742cf

Browse files
committed
Add test_document_with_dry_run
1 parent d7971e4 commit 0d742cf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/test_rdoc_rdoc.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ def test_document # functional test
4040
assert_equal 'title', store.title
4141
end
4242

43+
def test_document_with_dry_run # functional test
44+
options = RDoc::Options.new
45+
options.files = [File.expand_path('../xref_data.rb', __FILE__)]
46+
options.setup_generator 'darkfish'
47+
options.main_page = 'MAIN_PAGE.rdoc'
48+
options.root = Pathname File.expand_path('..', __FILE__)
49+
options.title = 'title'
50+
options.dry_run = true
51+
52+
rdoc = RDoc::RDoc.new
53+
54+
temp_dir do
55+
capture_io do
56+
rdoc.document options
57+
end
58+
end
59+
end
60+
4361
def test_gather_files
4462
a = File.expand_path __FILE__
4563
b = File.expand_path '../test_rdoc_text.rb', __FILE__

0 commit comments

Comments
 (0)