all repos — markup @ 122b433bb1ad4cf50896186944ed0820e8041303

The code we use to render README.your_favorite_markup

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  Dir['test/markups/README.*'].each do |readme|
 8    next if readme =~ /html$/
 9    markup = readme.split('.').last
10
11    define_method "test_#{markup}" do
12      expected = File.read("#{readme}.html")
13      actual = GitHub::Markup.render(readme, File.read(readme))
14
15      assert expected == actual, <<-message
16#{markup} expected:
17#{expected}
18#{markup} actual:
19#{actual}
20message
21    end
22  end
23end