require 'test_helper' class CuttingBoardTest < Test::Unit::TestCase context "basic behavior" do setup do @board = Flannel::CuttingBoard.new end should "strip and convert underscores to pre tags" do markup = "_foo\n\n bar\n_" assert_equal "
foo\n\n bar", @board.cut(markup) end should "preformat text when both start and end line have the markers" do markup = "_foo\n\n_ bar" assert_equal "
foo\n\n bar", @board.cut(markup) end should "not replace in preformatted text" do markup = "_4 - 2 > 2 - 2\n_" assert_equal '
4 - 2 > 2 - 2', @board.cut(markup) end end context "When block starts with one or more equals signs, it" do setup do @board = Flannel::CuttingBoard.new end should "convert one equals to a header one" do markup = "= Some header" result = "