require 'test_helper' class FlannelTest < Test::Unit::TestCase should "wrap functionality up in a neat package" do markup = "== Foo\n\n* Bar" assert_equal "

Foo

\n\n", Flannel.quilt(markup) end should "return nil if text is nil" do assert_nil Flannel.quilt(nil) end should "parse paragraphs correctly" do input = "\nThis is paragraph one.\n\nThis is paragraph two.\n\nThis is paragraph three. Watchout for the end of file.\n" output = "

This is paragraph one.

\n\n

This is paragraph two.

\n\n

This is paragraph three. Watchout for the end of file.

" assert_equal output, Flannel.quilt(input) end end