Sha256: 3c9d2fbb1f2474c7e9e6dd9ef95e2ae2804133de6c19f89cb226c9863a1917cf
Contents?: true
Size: 767 Bytes
Versions: 4
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true require 'test_helper' class TestEncoding < Minitest::Test # see http://git.io/vq4FR def test_encoding contents = fixtures_file('curly.md') doc = QiitaMarker.render_doc(contents, :SMART) render = doc.to_html assert_equal('<p>This curly quote “makes qiita_marker throw an exception”.</p>', render.rstrip) render = doc.to_xml assert_includes(render, '<text xml:space="preserve">This curly quote “makes qiita_marker throw an exception”.</text>') end def test_string_content_is_utf8 doc = QiitaMarker.render_doc('Hi *there*') text = doc.first_child.last_child.first_child assert_equal('there', text.string_content) assert_equal('UTF-8', text.string_content.encoding.name) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
qiita_marker-0.23.2.3 | test/test_encoding.rb |
qiita_marker-0.23.2.2 | test/test_encoding.rb |
qiita_marker-0.23.2.1 | test/test_encoding.rb |
qiita_marker-0.23.2.0 | test/test_encoding.rb |