require 'helper' class TestSlimEmbeddedEngines < TestSlim def test_render_with_erb source = %q{
Hello from <%= text.upcase %>! Second Line! <% if true %><%= true %><% end %> } assert_html "
Hello from BEFORE ERB BLOCK!\nSecond Line!\ntrue
", source end def test_render_with_markdown # Keep the trailing spaces. source = %q{Hello from Markdown!
\n\n3
\n\nHello from Markdown!
\n\n3
\n\nHello from Markdown!
\n\n3
\n\n\nHello
\n", source end def test_render_with_wiki source = %q{Hi
}, source end def test_render_with_javascript_including_variable # Keep the trailing space behind "javascript: "! source = %q{ - func = "alert('hello');"