Sha256: ae1fde84c8a51f23ef8c20aa3c12d2a30b53401c1a2b64d61c42c7324e622096

Contents?: true

Size: 792 Bytes

Versions: 5

Compression:

Stored size: 792 Bytes

Contents

require 'helper'

class TestSlimPretty < TestSlim
  def setup
    Slim::Engine.set_default_options :pretty => true
  end

  def teardown
    Slim::Engine.set_default_options :pretty => false
  end

  def test_pretty
    source = %q{
doctype 5
html
  head
    title Hello World!
    sass:
      body
        background-color: red
  body
    #container
      p Hello
        World!
      p= "dynamic text with\nnewline"
}

    result = %q{<!DOCTYPE html>
<html>
  <head>
    <title>Hello World!</title>
    <style type="text/css">
      body {
        background-color: red;
      } 
    </style>
  </head>
  <body>
    <div id="container">
      <p>Hello
        World!</p>
      <p>dynamic text with
        newline</p>
    </div>
  </body>
</html>}

    assert_html result, source
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slim-1.0.2 test/slim/test_pretty.rb
slim-1.0.1 test/slim/test_pretty.rb
slim-1.0.0 test/slim/test_pretty.rb
slim-0.9.4 test/slim/test_pretty.rb
slim-0.9.3 test/slim/test_pretty.rb