Sha256: ab6d5ff9d508c1adea116e471e69592911502303c99644eca8d4555e87447f6e
Contents?: true
Size: 885 Bytes
Versions: 2
Compression:
Stored size: 885 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' require "rack" require_fixtures 'application_spec_applications' describe Trellis::Renderer do it "should render a given page template" do page = TestApp::Home.new renderer = Trellis::Renderer.new(page) result = renderer.render result.should == "<html><body><h1>Hello World!</h1></body></html>" end it "should have access to page instance variables" do page = TestApp::SamplePage.new page.value = "chunky bacon" renderer = Trellis::Renderer.new(page) result = renderer.render result.should == "<html><body>chunky bacon</body></html>" end it "should have access to the page name" do page = TestApp::AnotherSamplePage.new renderer = Trellis::Renderer.new(page) result = renderer.render result.should == "<html><body>TestApp::AnotherSamplePage</body></html>" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trellis-0.0.6 | test/renderer_spec.rb |
trellis-0.0.5 | test/renderer_spec.rb |