summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/node_spec.rb12
-rw-r--r--spec/spec_helper.rb2
2 files changed, 14 insertions, 0 deletions
diff --git a/spec/node_spec.rb b/spec/node_spec.rb
index 74eb5e9..db5f3f6 100644
--- a/spec/node_spec.rb
+++ b/spec/node_spec.rb
@@ -59,6 +59,18 @@ describe Zorglub do
h['view'].should == vu
end
#
+ #
+ it "layout proc, method level layout and engine definitions should work" do
+ r = Node2.call( {'PATH_INFO'=>'/index'} )
+ r.status.should == 200
+ h = YAML.load r.body[0]
+ ly = File.join Zorglub::Config.root, Zorglub::Config.layout_dir, 'main.spec'
+ vu = File.join Zorglub::Config.root, Zorglub::Config.view_dir, Node2.r, 'index.spec'
+ h['path'].should == ly
+ h['layout'].should == ly
+ h['view'].should == vu
+ end
+ #
end
#
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 1ada235..cf6af3a 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -55,7 +55,9 @@ class Node3 < Node2
end
#
APP = Zorglub::App.new do
+ map '/spec0', Node0
map '/spec1', Node1
+ map '/spec3', Node3
end
class Node2
map APP, '/spec2'