Sha256: 8ffbe97fef48b9bd444e1b180de83187e7fd325e1e0df86d2ff96c632cd1a0b7
Contents?: true
Size: 846 Bytes
Versions: 1
Compression:
Stored size: 846 Bytes
Contents
require File.expand_path("../../spec_helper", File.dirname(__FILE__)) describe Sprinkle::Package::Rendering, 'rendering' do before do @package = package :something do end end it "should be able to calculate md5s" do @package.md5("test").should == "098f6bcd4621d373cade4e832627b4f6" end it "should allow passing locals to template" do t=@package.template("hello <%= world %>", :world => "world") t.should == "hello world" end it "should be able to render a file from absolute path" do path=File.join(__FILE__, "../../templates/test.erb") t=@package.render("test") t.should == "hello " end it "should be able to render a file from templates" do @package = package :new do @world = "world" end t=@package.render("test") t.should == "hello world" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sprinkle-0.7.1.1 | spec/sprinkle/extensions/rendering_spec.rb |