From 481649ad3dc4e29af5fcdeaa4331fb4c1aff349c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 16 Jan 2012 15:48:04 +0100 Subject: add layout_base_path! specs --- spec/data/alt/do_render | 0 spec/data/alt/layout/default | 0 spec/node_spec.rb | 8 +++++++- spec/spec_helper.rb | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 spec/data/alt/do_render create mode 100644 spec/data/alt/layout/default diff --git a/spec/data/alt/do_render b/spec/data/alt/do_render new file mode 100644 index 0000000..e69de29 diff --git a/spec/data/alt/layout/default b/spec/data/alt/layout/default new file mode 100644 index 0000000..e69de29 diff --git a/spec/node_spec.rb b/spec/node_spec.rb index 66ff114..279ec2b 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -212,7 +212,13 @@ describe Zorglub do it "view_base_path! should work" do r = Node7.my_call '/view_path' h = YAML.load r.body[0] - h[:view].should == File.join(Zorglub::Config.root, 'alt/do_render') + h[:view].should == File.join(Zorglub::Config.root, 'alt','do_render') + end + # + it "layout_base_path! should work" do + r = Node7.my_call '/view_path' + h = YAML.load r.body[0] + h[:layout].should == File.join(Zorglub::Config.root, 'alt','layout','default') end # end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4a5a9b2..8c6c2bc 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -166,7 +166,7 @@ class Node6 < Zorglub::Node end # class Node7 < Zorglub::Node - Zorglub::Config.debug=true + layout_base_path! File.join Zorglub::Config.root, 'alt','layout' view_base_path! File.join Zorglub::Config.root, 'alt' def view_path view! 'do_render' -- cgit v1.1-2-g2b99