require 'spec_helper'
RSpec.describe 'Multiline rendering', type: :render do
it 'handles multiline syntax' do
expect(render_string(<\nfoo bar baz\nquux\n
\n")
%p
= "foo " + |
"bar " + |
"baz" |
= "quux"
HAML
end
it 'handles multiline with non-script line' do
expect(render_string(<\nfoo \nbar\n\n")
%p
foo |
bar
HAML
end
it 'handles multiline at the end of template' do
expect(render_string(<\nfoo bar baz \n\n")
%p
foo |
bar |
baz |
HAML
end
it 'is not multiline' do
expect(render_string(<\nhello\n|\nworld\n\n")
%div
hello
|
world
HAML
end
end