summaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-04 09:14:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-04 09:14:04 +0100
commite782955f6f6b0814685c9377b6663a76d18c0b7b (patch)
treeaababd07598d44e4af2cc4d823afd8d1bf58d908 /spec/spec_helper.rb
parent50b5749972b78a5a4e03e5c2075e884296f0269d (diff)
downloadzorglub-e782955f6f6b0814685c9377b6663a76d18c0b7b.zip
zorglub-e782955f6f6b0814685c9377b6663a76d18c0b7b.tar.gz
Node swallows defs as inherited_vars, update specs
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 84aebdd..96d224f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -11,7 +11,6 @@ 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|
@@ -101,22 +100,25 @@ class Node3 < Zorglub::Node
end
#
class Node4 < Zorglub::Node
- defs :js,'js0','js1'
+ inherited_var :js,'js0','js1'
def index
no_layout
- defs(:js).to_yaml
+ inherited_var(:js).to_yaml
end
def more
no_layout
- defs(:js,'js2').to_yaml
+ inherited_var(:js,'js2').to_yaml
end
end
#
class Node5 < Node4
- defs :js, 'js3'
+ inherited_var :js, 'js3'
+ inherited_var :css, 'css0', 'css1'
def index
no_layout
- defs(:js,'jsx').to_yaml
+ js = inherited_var(:js,'jsx')
+ css = inherited_var(:css, 'css0', 'css1','css2')
+ js.concat(css).to_yaml
end
end
#