# coding: UTF-8 rootdir = File.dirname(File.dirname(__FILE__)) $LOAD_PATH.unshift "#{rootdir}/lib" if defined? Encoding Encoding.default_internal = 'UTF-8' end require 'test/unit' require 'github/markdown' require 'nokogiri' def html_equal(html_a, html_b) assert_equal Nokogiri::HTML::DocumentFragment.parse(html_a).to_html, Nokogiri::HTML::DocumentFragment.parse(html_b).to_html end class GFMBasicTest < Test::Unit::TestCase def test_that_render_works GitHub::Markdown.to_html("Hello **world**!", :gfm) end def test_that_code_blocks_work GitHub::Markdown.to_html("~~~~~~~~~~\nhello world!\n~~~~~~~~~\n", :gfm) end end