spec/scanner_spec.rb in curly-templates-0.11.0 vs spec/scanner_spec.rb in curly-templates-0.12.0
- old
+ new
@@ -39,9 +39,27 @@
scan("foo\n").should == [
[:text, "foo\n"]
]
end
+ it "allows escaping Curly quotes" do
+ scan('foo {{{ bar').should == [
+ [:text, "foo "],
+ [:text, "{{"],
+ [:text, " bar"]
+ ]
+
+ scan('foo }} bar').should == [
+ [:text, "foo }} bar"]
+ ]
+
+ scan('foo {{{ lala! }} bar').should == [
+ [:text, "foo "],
+ [:text, "{{"],
+ [:text, " lala! }} bar"]
+ ]
+ end
+
it "treats quotes as text" do
scan('"').should == [
[:text, '"']
]
end