Permalink
Browse files

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.
  • Loading branch information...
1 parent 94b3fd4 commit 38683a8cc244a1152b07ececbc31d7caffe70432 @mikewest mikewest committed Oct 19, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/rocco_test.rb
View
@@ -38,7 +38,7 @@ def test_sections
r = roccoize( "filename.rb", "# Comment 1\ndef codeblock\nend\n" )
assert_equal 1, r.sections.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 ]
end
@@ -63,14 +63,14 @@ def test_splitting
r = Rocco.new( 'test' ) { "" } # Generate throwaway instance so I can test `split`
assert_equal(
[
- [ " Comment 1" ],
+ [ "Comment 1" ],
[ "def codeblock\nend" ]
],
r.split([ [ [ "# Comment 1" ], [ "def codeblock", "end" ] ] ])
)
assert_equal(
[
- [ " Comment 1", " Comment 2" ],
+ [ "Comment 1", "Comment 2" ],
[ "def codeblock", "end" ]
],
r.split( [
@@ -148,6 +148,6 @@ def test_issue15_extra_space_after_comment_character_remains
!r.sections[0][0].include?( "<hr />" ),
"`<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

0 comments on commit 38683a8

Please sign in to comment.