File: doctype_test.rb

package info (click to toggle)
ruby-haml 6.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,004 kB
  • sloc: ruby: 9,908; sh: 23; makefile: 11
file content (29 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
describe Haml::Engine do
  include RenderHelper

  describe 'doctype' do
    it 'renders html5 doctype' do
      assert_render(<<-HTML.unindent, <<-HAML.unindent)
        <!DOCTYPE html>
      HTML
        !!!
      HAML
    end

    it 'renders xml doctype' do
      assert_render(<<-HTML.unindent, <<-HAML.unindent, format: :xhtml)
        <?xml version='1.0' encoding='utf-8' ?>
      HTML
        !!! XML
      HAML
    end

    it 'renders rdfa doctype' do
      assert_render(<<-HTML.unindent, <<-HAML.unindent, format: :xhtml)
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
      HTML
        !!! RDFa
      HAML
    end
  end
end