Skip to content
Draft
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: 4 additions & 0 deletions lib/rdoc/generator/darkfish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ def write_style_sheet
# objects containing the extracted information.

def generate
if self.class == RDoc::Generator::Darkfish
warn "The Darkfish template is deprecated and will be removed in version 9.0."
end

setup

write_style_sheet
Expand Down
8 changes: 8 additions & 0 deletions test/rdoc/generator/aliki_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ def teardown
FileUtils.rm_rf @tmpdir
end

def test_generate_does_not_warn_about_darkfish_deprecation
_, err = capture_output do
@g.generate
end

assert_empty err
end

def test_inheritance_and_template_dir
assert_kind_of RDoc::Generator::Darkfish, @g
assert_match %r{/template/aliki\z}, @g.template_dir.to_s
Expand Down
8 changes: 8 additions & 0 deletions test/rdoc/generator/darkfish_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def teardown
FileUtils.rm_rf @tmpdir
end

def test_generate_warns_about_deprecation
_, err = capture_output do
@g.generate
end

assert_equal "The Darkfish template is deprecated and will be removed in version 9.0.\n", err
end

def test_generate
top_level = @store.add_file 'file.rb'
top_level.add_class @klass.class, @klass.name
Expand Down