Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
Add simple template_view spec
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Aug 13, 2013
1 parent 60474da commit 6a4643d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/template_view_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'spec_helper'
require 'vienna/template_view'

Template.new('template_view_spec') do |buf|
buf.append "foo"
buf.append "bar"
buf.join
end

class TemplateViewSpec < Vienna::TemplateView
template :template_view_spec
end

describe Vienna::TemplateView do
before do
@view = TemplateViewSpec.new
@tmpl = Template['template_view_spec']
end

describe "#_render_template" do
it "returns the rendered content for the template" do
@view._render_template(@tmpl).should == "foobar"
end
end
end

0 comments on commit 6a4643d

Please sign in to comment.