forked from rtomayko/rocco
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a stylesheet option to build docs using an alternative css styles…
…heet. Use `rocco -s "http://example.com/style.css"` to use a different stylesheet to the default docco one.
- Loading branch information
Showing
5 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require File.expand_path('../helper', __FILE__) | ||
|
||
class RoccoStylesheetTests < Test::Unit::TestCase | ||
def test_default_stylesheet | ||
r = Rocco.new( 'file.rb', [ 'file.rb'] ) { | ||
"# Content" | ||
} | ||
html = r.to_html | ||
assert( | ||
html.include?('<link rel="stylesheet" href="http://jashkenas.github.com/docco/resources/docco.css">') | ||
) | ||
end | ||
|
||
def test_custom_stylesheet | ||
r = Rocco.new( 'file.rb', [ 'file.rb'], :stylesheet => 'http://example.com/custom.css' ) { | ||
"# Content" | ||
} | ||
html = r.to_html | ||
assert( | ||
html.include?('<link rel="stylesheet" href="http://example.com/custom.css">') | ||
) | ||
end | ||
end |