Sha256: bf20635c3ab29328a6251311508da5101bbbd5f43d2b0c49f046fe919239e283
Contents?: true
Size: 673 Bytes
Versions: 1
Compression:
Stored size: 673 Bytes
Contents
require 'test_helper' require 'json' class TestSpec < Minitest::Unit::TestCase cases = JSON.parse(open("test/spec_tests.json", 'r').read) cases.each do |testcase| define_method("test_to_html_example_#{testcase['example']}") do doc = Node.parse_string(testcase['markdown']) actual = doc.to_html doc.free assert_equal testcase['html'], actual, testcase['markdown'] end define_method("test_html_renderer_example_#{testcase['example']}") do doc = Node.parse_string(testcase['markdown']) actual = HtmlRenderer.new.render(doc) doc.free assert_equal testcase['html'], actual, testcase['markdown'] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
commonmarker-0.0.1 | test/test_spec.rb |