Sha256: eef5ac3836d238c5e162232edfd2e1a888eaf868de70b4cdf3ccfc3732310632
Contents?: true
Size: 573 Bytes
Versions: 2
Compression:
Stored size: 573 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
heel-4.0.1 | spec/template_vars_spec.rb |
heel-4.0.0 | spec/template_vars_spec.rb |