spec/ice_spec.rb in ice-0.2.2 vs spec/ice_spec.rb in ice-0.2.3

- old
+ new

@@ -1,17 +1,20 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Ice" do - - it "converts a javascript template to html" do Ice.convert_template("<%= 'hello world' %>").should == "hello world" end it "takes variables as syms" do vars = {:hola => "hello", :mundo => "world" } Ice.convert_template("<%= hola + ' ' + mundo %>", vars).should == "hello world" + end + + it "accepts ampersands" do + vars = {:foo => "&"} + Ice.convert_template("<%= foo %>", vars).should == "&" end it "takes variables as string" do vars = {'hola' => "hello", 'mundo' => "world" } Ice.convert_template("<%= hola + ' ' + mundo %>", vars).should == "hello world"