require File.expand_path('../../test_helper', __FILE__) class HtmlHelper < Test::Unit::TestCase include Main::HtmlHelpers test "test" do assert_equal "", html("") end test "markdown pre" do assert_equal html("
hi
"), "

hi

" end test "markdown" do assert_equal html("hi"), "

hi

" assert_equal html("hi\n"), "

hi

" assert_equal html(" \n hi \n "), "

hi

" end test "stupidity" do assert_equal "

hi

", html("

hi
") assert_equal "

hi

", html("

hi

") end test "textile" do assert_equal html('"ab":/cd'), '

ab

' assert_equal "

Hello

\n

Whats up?

", html("\nh2. Hello\n\nWhats up?\n") end end