Sha256: bc6d5f8e93be3e7bd41bb0ba393d09a4ffdaa4f3eaa6e83668702c76a67da9df
Contents?: true
Size: 926 Bytes
Versions: 1
Compression:
Stored size: 926 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "lib", "staticmatic") describe StaticMatic::Base do before :all do @sample_site_path = File.dirname(__FILE__) + "/fixtures/sample" @staticmatic = StaticMatic::Base.new(@sample_site_path) end it "should render with layout" do output = @staticmatic.render("hello_world.html") output.should include("My Sample Site") output.should include("Hello world!") end it "should render with layout specified in template" do output = @staticmatic.render("specify_layout") output.should include("This is a Specified Layout") end it "should clean layout variable for next request" do @staticmatic.template("specify_layout").view.instance_variable_get("@layout").should be_nil end it "should allow disabling the layout" do output = @staticmatic.render("no_layout") output.should_not include("My Sample Site") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tdreyno-staticmatic-2.9.0 | spec/layouts_spec.rb |