test/flannel_test.rb in flannel-0.2.10 vs test/flannel_test.rb in flannel-0.2.11
- old
+ new
@@ -15,10 +15,16 @@
output = "<p id='p_one'>This is paragraph one.</p>\n\n<p id='p_two'>This is paragraph two.</p>\n\n<p id='p_three'>This is paragraph three. Watchout for the end of file.</p>"
assert_equal output, Flannel.quilt(input)
end
context "basic behavior" do
+
+ should "parse a block without an id" do
+ markup = ":paragraph\n this is my paragraph"
+ assert_equal "<p>this is my paragraph</p>", Flannel.quilt(markup)
+ end
+
should "strip and convert underscores to pre tags" do
markup = ":preformatted foo\nfoo\n\n bar\n"
assert_equal "<pre id='foo'>foo\n\n bar\n</pre>", Flannel.quilt(markup)
end
@@ -47,9 +53,18 @@
context "When block is a list, it" do
should "be wrapped in ul tags" do
markup = ":list list\n Yadda\nYadda\nYadda"
result = "<ul id='list'><li>Yadda</li>\n<li>Yadda</li>\n<li>Yadda</li></ul>"
+
+ assert_equal result, Flannel.quilt(markup)
+ end
+ end
+
+ context "bug fixes" do
+ should "parse a simple paragraph" do
+ markup = ":paragraph\nbar bar\n"
+ result = "<p>bar bar</p>"
assert_equal result, Flannel.quilt(markup)
end
end
end