Sha256: 4c60ac778d235530f6f594898e18db297e708a671202e069d740beb00825140d
Contents?: true
Size: 399 Bytes
Versions: 3
Compression:
Stored size: 399 Bytes
Contents
require "spec_helper" require "tagen/erb" describe ERB do describe "#result" do before :all do @erb = ERB.new("<%=a%>") end it "runs ok" do a = 1 expect(@erb.result(binding)).to eq("1") end it "runs ok with local " do expect(@erb.result(nil, a: 2)).to eq("2") end it "support string as key in locals" do expect(@erb.result(nil, "a" => 2)).to eq("2") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tagen-2.0.2 | spec/tagen/erb_spec.rb |
tagen-2.0.1 | spec/tagen/erb_spec.rb |
tagen-2.0.0 | spec/tagen/erb_spec.rb |