$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
- \r
\r
One\r
\r
\r
- \r
\r
Two\r
\r
\r
\r\n
output
test 'README.rst', <<-input, <<-output
1. Blah blah ``code`` blah
2. More ``code``, hooray
input
- Blah blah code blah
- More code, hooray
\n
output
test 'README.pod', <<-input, <<-output
=head1 NAME
podsample - A sample pod document
=item * This is a bulleted list.
=item * Here's another item.
input
output
end