From 642da3156e03049ceae1e16d01f1c36457c59542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 3 Jan 2012 23:31:16 +0100 Subject: spec: add partial spec --- spec/node_spec.rb | 4 ++++ spec/spec_helper.rb | 3 +++ 2 files changed, 7 insertions(+) diff --git a/spec/node_spec.rb b/spec/node_spec.rb index cc665b7..8d910a3 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -112,6 +112,10 @@ describe Zorglub do r.body[0].should == "layout_start view_content layout_end" end # + it "partial should render correctly" do + Node0.partial(:do_partial, 1, 2).should == "view_content" + end + # end # end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5763a8c..fef8cd5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -49,6 +49,9 @@ class Node0 < Zorglub::Node def do_render engine 'real' end + def do_partial a1, a2 + engine 'real' + end end # class Node1 < Zorglub::Node -- cgit v1.1-2-g2b99