$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib" $LOAD_PATH.unshift File.dirname(__FILE__) require 'github/markup' require 'test/unit' require 'helper' class MarkupTest < Test::Unit::TestCase extend MarkupTestDSL def test_graceful_fail content = "* One\n* Two" text = GitHub::Markup.render('README.imadeitup', content) assert_equal content, text end test 'README.markdown', <<-input, <<-output * One * Two input \n output test 'README.textile', <<-input, <<-output.strip * One * Two input \n output test 'README.txt', <<-input, <<-output * One * Two input * One * Two output test 'README.rdoc', <<-input, <<-output * One * Two input output test 'README.asciidoc', <<-input, <<-output * One * Two input
\r\n output test 'README.rst', <<-input, <<-output 1. Blah blah ``code`` blah 2. More ``code``, hooray input
  1. Blah blah code blah
  2. More code, hooray
\n output end