spec/render/plain_spec.rb in faml-0.2.8 vs spec/render/plain_spec.rb in faml-0.2.9
- old
+ new
@@ -15,6 +15,13 @@
end
it 'raises error when interpolation is unterminated' do
expect { render_string('%span foo#{1 + 2') }.to raise_error(Faml::TextCompiler::InvalidInterpolation)
end
+
+ it 'raises error when text has children' do
+ expect { render_string(<<HAML) }.to raise_error(Faml::SyntaxError, /nesting within plain text/)
+hello
+ world
+HAML
+ end
end