require 'helper' class TestSlimHtmlStructure < TestSlim def test_simple_render # Keep the trailing space behind "body "! source = %q{ Simple Test Title
Hello World, meet Slim. } assert_html "Hello World, meet Slim.
", source end def test_html_tag_with_text_and_empty_line # Keep the trailing space behind "body "! source = %q{Hello
World } assert_html "
Hello
\nWorld
", source end def test_html_namespaces source = %q{Lorem ipsum dolor sit amet, consectetur adipiscing elit.
', source end def test_render_with_text_block_with_subsequent_markup source = %q{Some more markup } assert_html "
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\nSome more markup
", source end def test_render_with_text_block_with_trailing_whitespace source = %q{
this is
> a link to
page
}
assert_html " this is\n a link to\npage This is line one.
> This is line two.
> This is line three.
> This is line four.
This is a new paragraph.
}
assert_html " This is line one.\n This is line two.\n This is line three.\n This is line four. This is a new paragraph. This is line two.
This is line one.\n This is line two.\nThis is a bold line in the paragraph.\n This is more content. This is line two.
This is line one.\n This is line two.\nThis is a bold line in the paragraph.\n This is more content. This is line one.
> This is line two.
> This is line three.
> This is line four.
This is line one.\n This is line two.\n This is line three.\n This is line four.\nThis is a bold line in the paragraph.\n This is more content. There will be 3 spaces in front of this line.
}
assert_html ' There will be 3 spaces in front of this line. This is line one.
> This is line two.
}
assert_html " This is line one.\n This is line two. This is line one.
> This is line two.
}
assert_html " This is line one.\n This is line two. This is line one.
This is line two.
}
assert_html " This is line one.\nThis is line two. = hello_world
= hello_world
=hello_world
}
assert_html " Hello World from @env = hello_world =hello_world = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' = output_number = output_number
}
assert_html ' = output_number = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' 1337 = output_number
}
assert_html ' 1337