Skip to content

Commit

Permalink
Add test for newlines after ugly scripts
Browse files Browse the repository at this point in the history
See #748
  • Loading branch information
mattwildig committed Feb 24, 2014
1 parent 413e6a6 commit 1e29322
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/engine_test.rb
Expand Up @@ -1004,6 +1004,16 @@ def test_script_with_if_shouldnt_output
HAML
end

def test_script_adds_newline_in_ugly_with_block
scope = Object.new
def scope.foo
"Hello"
end
haml = "= foo do\n .ignored\nEnd\n"
html = "Hello\nEnd\n"
assert_equal(html, render(haml, :scope => scope, :ugly => true))
end

# Options tests

def test_filename_and_line
Expand Down

0 comments on commit 1e29322

Please sign in to comment.