Skip to content

Commit 317a14b

Browse files
committed
Clean up Darkfish-era test artifacts
- Return 404 for table_of_contents.html in servlet since Aliki does not have a table_of_contents template - Remove tautological font assertions from aliki_test that only existed to contrast with the now-removed Darkfish theme
1 parent eccac8d commit 317a14b

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

lib/rdoc/servlet.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,12 @@ def show_documentation(req, res)
392392
when nil, '', 'index.html' then
393393
res.body = generator.generate_index
394394
when 'table_of_contents.html' then
395-
res.body = generator.generate_table_of_contents
395+
result = generator.generate_table_of_contents
396+
if result
397+
res.body = result
398+
else
399+
not_found generator, req, res
400+
end
396401
when 'js/search_index.js' then
397402
documentation_search store, generator, req, res
398403
else

test/rdoc/generator/aliki_test.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ def test_write_style_sheet_copies_css_and_js_only
8181
assert_file 'js/search_ranker.js'
8282
assert_file 'js/theme-toggle.js'
8383
assert_file 'js/c_highlighter.js'
84-
85-
# Aliki should NOT have fonts
86-
refute File.exist?('css/fonts.css'), 'Aliki should not copy fonts.css'
87-
refute File.exist?('fonts'), 'Aliki should not copy fonts directory'
8884
end
8985

9086
# Aliki-specific: verify version query strings on asset references

test/rdoc/rdoc_servlet_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,7 @@ def test_show_documentation_table_of_contents
432432

433433
@s.show_documentation @req, @res
434434

435-
assert_equal 'text/html', @res.content_type
436-
# Aliki does not have a table_of_contents template, so the body is nil
437-
assert_nil @res.body
435+
assert_equal 404, @res.status
438436
end
439437

440438
def test_show_documentation_page

0 commit comments

Comments
 (0)