Cleaning up tests after bugfix merges:
As a result of fixing issue #15, a few tests broken. This commit brings the tests up to date with the latest behavior.
This commit is contained in:
parent
94b3fd4e51
commit
38683a8cc2
@ -38,7 +38,7 @@ class RoccoBasicTests < Test::Unit::TestCase
|
|||||||
r = roccoize( "filename.rb", "# Comment 1\ndef codeblock\nend\n" )
|
r = roccoize( "filename.rb", "# Comment 1\ndef codeblock\nend\n" )
|
||||||
assert_equal 1, r.sections.length
|
assert_equal 1, r.sections.length
|
||||||
assert_equal 2, r.sections[ 0 ].length
|
assert_equal 2, r.sections[ 0 ].length
|
||||||
assert_equal "<p> Comment 1</p>\n", r.sections[ 0 ][ 0 ]
|
assert_equal "<p>Comment 1</p>\n", r.sections[ 0 ][ 0 ]
|
||||||
assert_equal "<span class=\"k\">def</span> <span class=\"nf\">codeblock</span>\n<span class=\"k\">end</span>", r.sections[ 0 ][ 1 ]
|
assert_equal "<span class=\"k\">def</span> <span class=\"nf\">codeblock</span>\n<span class=\"k\">end</span>", r.sections[ 0 ][ 1 ]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -63,14 +63,14 @@ class RoccoBasicTests < Test::Unit::TestCase
|
|||||||
r = Rocco.new( 'test' ) { "" } # Generate throwaway instance so I can test `split`
|
r = Rocco.new( 'test' ) { "" } # Generate throwaway instance so I can test `split`
|
||||||
assert_equal(
|
assert_equal(
|
||||||
[
|
[
|
||||||
[ " Comment 1" ],
|
[ "Comment 1" ],
|
||||||
[ "def codeblock\nend" ]
|
[ "def codeblock\nend" ]
|
||||||
],
|
],
|
||||||
r.split([ [ [ "# Comment 1" ], [ "def codeblock", "end" ] ] ])
|
r.split([ [ [ "# Comment 1" ], [ "def codeblock", "end" ] ] ])
|
||||||
)
|
)
|
||||||
assert_equal(
|
assert_equal(
|
||||||
[
|
[
|
||||||
[ " Comment 1", " Comment 2" ],
|
[ "Comment 1", "Comment 2" ],
|
||||||
[ "def codeblock", "end" ]
|
[ "def codeblock", "end" ]
|
||||||
],
|
],
|
||||||
r.split( [
|
r.split( [
|
||||||
@ -148,6 +148,6 @@ class RoccoIssueTests < Test::Unit::TestCase
|
|||||||
!r.sections[0][0].include?( "<hr />" ),
|
!r.sections[0][0].include?( "<hr />" ),
|
||||||
"`<hr />` present in rendered documentation text. It should be a header, not text followed by a horizontal rule."
|
"`<hr />` present in rendered documentation text. It should be a header, not text followed by a horizontal rule."
|
||||||
)
|
)
|
||||||
assert_equal( "<h2>Comment 1</h2>", r.sections[0][0] )
|
assert_equal( "<h2>Comment 1</h2>\n", r.sections[0][0] )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user