Sha256: 119e37629a98899779a3951559aa20e5764b81e249308df9e5fa1c93f2ae7a66
Contents?: true
Size: 567 Bytes
Versions: 6
Compression:
Stored size: 567 Bytes
Contents
require 'spec_helper' require 'pathname' describe Heel::TemplateVars do before do @template = ERB.new( "<%= foo %> && <%= bar %>" ) end it "exposes all its data members in a binding" do t = Heel::TemplateVars.new( :foo => 'foo', :bar => 'bar' ) s = @template.result( t.binding_for_template ) s.must_equal( "foo && bar") end it "data members may be added after instantiation" do t = Heel::TemplateVars.new t.foo = 'foo' t.bar = 'bar' s = @template.result( t.binding_for_template ) s.must_equal( "foo && bar") end end
Version data entries
6 entries across 6 versions & 1 rubygems