spec/compiler_newline_spec.rb in faml-0.2.10 vs spec/compiler_newline_spec.rb in faml-0.2.11
- old
+ new
@@ -166,9 +166,17 @@
b: 2}
= raise LineVerifier
HAML
end
+ it 'keeps newlines in static HTML-style attributes' do
+ expect(render_string(<<HAML)).to eq("<span a='1' b='2'></span>\n3\n")
+%span(a=1
+ b=2)
+= __LINE__
+HAML
+ end
+
it 'keeps newlines in dynamic attributes' do
expect { render_string(<<HAML) }.to raise_error(LineVerifier, raised_at(2))
%span{a: 1,
b: raise(LineVerifier)}
hello