Sha256: ac311c96eb578cfe10b97fae1ba5d58055486e7dd466eba9eed7b047354f027d
Contents?: true
Size: 1.32 KB
Versions: 23
Compression:
Stored size: 1.32 KB
Contents
require 'test_helper' class HTML5Test < Redcarpet::TestCase def test_that_html5_works section = <<EOS <section> <p>The quick brown fox jumps over the lazy dog.</p> </section> EOS figure = <<EOS <figure> <img src="http://example.org/image.jpg" alt=""> <figcaption> <p>Hello world!</p> </figcaption> </figure> EOS assert_renders section, section assert_renders figure, figure end def test_that_html5_works_with_code_blocks section = <<EOS \t<section> \t\t<p>The quick brown fox jumps over the lazy dog.</p> \t</section> EOS section_expected = <<EOE <pre><code><section> <p>The quick brown fox jumps over the lazy dog.</p> </section> </code></pre> EOE header = <<EOS <header> <hgroup> <h1>Section heading</h1> <h2>Subhead</h2> </hgroup> </header> EOS header_expected = <<EOE <pre><code><header> <hgroup> <h1>Section heading</h1> <h2>Subhead</h2> </hgroup> </header> </code></pre> EOE assert_renders section_expected, section assert_renders header_expected, header end def test_script_tag_recognition markdown = <<-Md <script type="text/javascript"> alert('Foo!'); </script> Md assert_renders markdown, markdown end end
Version data entries
23 entries across 23 versions & 5 rubygems