1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/spec/hamlit/engine/multiline_spec.rb
2015-03-16 08:20:03 +09:00

44 lines
720 B
Ruby

describe Hamlit::Engine do
describe 'multiline' do
it 'joins multi-lines ending with pipe' do
assert_render(<<-HAML, <<-HTML)
a |
b |
HAML
a b
HTML
end
it 'renders multi lines' do
assert_render(<<-HAML, <<-HTML)
= 'a' + |
'b' + |
'c' |
'd'
HAML
abc
'd'
HTML
end
it 'accepts invalid indent' do
assert_render(<<-HAML, <<-HTML)
%span
%div
= '1' + |
'2' |
%div
3
HAML
<span>
<div>
12
</div>
<div>
3
</div>
</span>
HTML
end
end
end