Sha256: 9ccfd9016a5a3fea65dc8950792940c3817ff2b089cd353f84f54612d34ee482

Contents?: true

Size: 630 Bytes

Versions: 38

Compression:

Stored size: 630 Bytes

Contents

require 'test_helper'

class SmartPunctTest < Minitest::Test
  smart_punct = open_spec_file('smart_punct.txt')

  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

38 entries across 38 versions & 2 rubygems

Version Path
commonmarker-0.18.2 test/test_smartpunct.rb
commonmarker-0.18.1 test/test_smartpunct.rb
commonmarker-0.18.0 test/test_smartpunct.rb
commonmarker-0.17.13 test/test_smartpunct.rb
commonmarker-0.17.12 test/test_smartpunct.rb
commonmarker-0.17.11 test/test_smartpunct.rb
commonmarker-0.17.10 test/test_smartpunct.rb
tdiary-5.0.8 vendor/bundle/gems/commonmarker-0.17.9/test/test_smartpunct.rb
commonmarker-0.17.9 test/test_smartpunct.rb
commonmarker-0.17.8 test/test_smartpunct.rb
commonmarker-0.17.7.1 test/test_smartpunct.rb
commonmarker-0.17.7 test/test_smartpunct.rb
commonmarker-0.17.6 test/test_smartpunct.rb
commonmarker-0.17.5 test/test_smartpunct.rb
commonmarker-0.17.4 test/test_smartpunct.rb
commonmarker-0.17.2 test/test_smartpunct.rb
commonmarker-0.17.1 test/test_smartpunct.rb
commonmarker-0.17.0 test/test_smartpunct.rb
commonmarker-0.16.8 test/test_smartpunct.rb
commonmarker-0.16.7 test/test_smartpunct.rb