spec/musterb_spec.rb in musterb-0.0.5 vs spec/musterb_spec.rb in musterb-0.0.6

- old
+ new

@@ -26,6 +26,16 @@ it "can iterate over values" do hash = {:foos => [1, 2, 3]} Musterb.render("{{#foos}}{{.}}{{/foos}}", hash).should eq "123" end + + it "escapes html" do + hash = {:foo => "<br>" } + Musterb.render("{{foo}}", hash).should eq "&lt;br&gt;" + end + + it "skips html evaluation with triple stach" do + hash = {:foo => "<br>" } + Musterb.render("{{{foo}}}", hash).should eq "<br>" + end end \ No newline at end of file