summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-16 15:48:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-16 15:48:04 +0100
commit481649ad3dc4e29af5fcdeaa4331fb4c1aff349c (patch)
treeea18dfe488916cfd09bc62451d9ebf40970ab2f5
parent66501cb0e23f40ea5ae1fe6185b23ffcb3d55de4 (diff)
downloadzorglub-481649ad3dc4e29af5fcdeaa4331fb4c1aff349c.zip
zorglub-481649ad3dc4e29af5fcdeaa4331fb4c1aff349c.tar.gz
add layout_base_path! specs
-rw-r--r--spec/data/alt/do_render0
-rw-r--r--spec/data/alt/layout/default0
-rw-r--r--spec/node_spec.rb8
-rw-r--r--spec/spec_helper.rb2
4 files changed, 8 insertions, 2 deletions
diff --git a/spec/data/alt/do_render b/spec/data/alt/do_render
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/spec/data/alt/do_render
diff --git a/spec/data/alt/layout/default b/spec/data/alt/layout/default
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/spec/data/alt/layout/default
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'