summaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-03 17:08:32 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-03 17:08:32 +0100
commitc2c4286fa16e726d227b678fb18d30f1cbb93612 (patch)
tree6e9688ad07346268c06de4b51743f01cba0c4628 /spec/spec_helper.rb
parent5df4814c2e2d038e384d87b258bf508ee4c3a6cb (diff)
downloadzorglub-c2c4286fa16e726d227b678fb18d30f1cbb93612.zip
zorglub-c2c4286fa16e726d227b678fb18d30f1cbb93612.tar.gz
node_spec: set proc layout and default layout view spec
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 3ca9523..1ada235 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,20 +8,27 @@ begin
rescue LoadError
end
#
+require 'yaml'
+#
require 'zorglub'
#
-ENGINE_PROC = Proc.new { |path,obj| "path=>#{path} : obj=>#{obj}" }
+ENGINE_PROC = Proc.new { |path,obj| {'path'=>path,'layout'=>obj.layout,'view'=>obj.view}.to_yaml }
+Zorglub::Config.register_engine 'default', nil, ENGINE_PROC
Zorglub::Config.register_engine 'spec-engine-1', 'spec', ENGINE_PROC
Zorglub::Config.register_engine 'spec-engine-2', 'spec', ENGINE_PROC
#
-Zorglub::Config.engine = 'haml'
+Zorglub::Config.engine = 'default'
+Zorglub::Config.root = File.join Dir.pwd, 'spec', 'data'
#
class Temp < Zorglub::Node
end
#
class Node0 < Zorglub::Node
# default
+ def index
+ end
def hello
+ layout 'none'
'world'
end
end