test/markup_test.rb (view raw)
1$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
2
3require 'github/markup'
4require 'test/unit'
5
6class MarkupTest < Test::Unit::TestCase
7 def test_markdown
8 markdown = GitHub::Markup.render('README.markdown', "* One\n* Two")
9 assert_equal <<markdown, markdown
10<ul>
11<li>One</li>
12<li>Two</li>
13</ul>
14
15markdown
16 end
17
18 def test_textile
19 textile = GitHub::Markup.render('README.textile', "* One\n* Two")
20 assert_equal <<textile.strip, textile
21<ul>
22\t<li>One</li>
23\t<li>Two</li>
24</ul>
25textile
26 end
27end