From 36e622233952e410396daee4ba64ddcb60145685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 3 Jan 2012 17:15:17 +0100 Subject: spec_helper: add missing mappings --- spec/node_spec.rb | 12 ++++++++++++ spec/spec_helper.rb | 2 ++ 2 files changed, 14 insertions(+) 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' -- cgit v1.1-2-g2b99