Sha256: dc5cf25c6a0191f02c02fcdfd7995c36bf210c3bc11d39f18bfdb1f7d4b88267
Contents?: true
Size: 647 Bytes
Versions: 2
Compression:
Stored size: 647 Bytes
Contents
require 'test_helper' class SmartPunctTest < Minitest::Test smart_punct = open_spec_file('smart_punct.txt', normalize: true) smart_punct.each do |testcase| doc = CommonMarker.render_doc(testcase[:markdown], :smart) define_method("test_smart_punct_example_#{testcase[:example]}") do actual = doc.to_html.strip assert_equal testcase[:html], actual, testcase[:markdown] end end def test_smart_hardbreak_no_spaces_render_doc markdown = "\"foo\"\nbaz" result = "<p>“foo”<br />\nbaz</p>\n" doc = CommonMarker.render_doc(markdown, :smart) assert_equal result, doc.to_html([:hardbreaks]) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
commonmarker-0.6.0 | test/test_smartpunct.rb |
commonmarker-0.5.1 | test/test_smartpunct.rb |