diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-04 02:09:42 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-04 02:09:42 +0100 |
commit | 2109f1a718094726f61eab595d3b6a8bedcc59e1 (patch) | |
tree | 6c17074173aa778d1c42a1d83facac3b30b2e61e /spec/spec_helper.rb | |
parent | 18777bb83937837f673f3876c96b7fb8ce59835e (diff) | |
download | zorglub-2109f1a718094726f61eab595d3b6a8bedcc59e1.zip zorglub-2109f1a718094726f61eab595d3b6a8bedcc59e1.tar.gz |
spec : add defs spec
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5297cb5..84aebdd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,6 +11,7 @@ end require 'yaml' # require 'zorglub' +require 'zorglub/defs' # HASH_PROC = Proc.new { |path,obj| {:path=>path,:layout=>obj.layout,:view=>obj.view,:args=>obj.args}.to_yaml } RENDER_PROC = Proc.new { |path,obj| @@ -99,10 +100,32 @@ class Node3 < Zorglub::Node end end # +class Node4 < Zorglub::Node + defs :js,'js0','js1' + def index + no_layout + defs(:js).to_yaml + end + def more + no_layout + defs(:js,'js2').to_yaml + end +end +# +class Node5 < Node4 + defs :js, 'js3' + def index + no_layout + defs(:js,'jsx').to_yaml + end +end +# APP = Zorglub::App.new do map '/node0', Node0 map '/node1', Node1 map '/node3', Node3 + map '/node4', Node4 + map '/node5', Node5 end class Node2 map APP, '/node2' |