diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/node_spec.rb | 10 | ||||
-rw-r--r-- | spec/spec_helper.rb | 24 |
2 files changed, 12 insertions, 22 deletions
diff --git a/spec/node_spec.rb b/spec/node_spec.rb index 06b7fe0..845cc11 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -14,19 +14,13 @@ describe Zorglub do Node0.layout.should == Zorglub::Config.layout end # - it "engine should return parent Node's engine" do - Node1.engine.should == "spec-engine-1" - end - # - it "layout should return parent Node's layout" do - Node1.layout.should == "spec-layout-1" - end - # it "engine should return class defined Node's engine" do + Node1.engine.should == "spec-engine-1" Node2.engine.should == "spec-engine-2" end # it "layout should return class defined Node's layout" do + Node1.layout.should == "spec-layout-1" Node2.layout.should == "spec-layout-2" end # diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0a36182..3ca9523 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,18 +16,6 @@ Zorglub::Config.register_engine 'spec-engine-2', 'spec', ENGINE_PROC # Zorglub::Config.engine = 'haml' # -class SpecNode < Zorglub::Node - @count=0 - class << self - attr_accessor :count - end - before_all do |node| - SpecNode.count +=1 - end - layout 'spec-layout-1' - engine 'spec-engine-1' -end -# class Temp < Zorglub::Node end # @@ -38,8 +26,16 @@ class Node0 < Zorglub::Node end end # -class Node1 < SpecNode - # overridded +class Node1 < Zorglub::Node + @count=0 + class << self + attr_accessor :count + end + before_all do |node| + Node1.count +=1 + end + layout 'spec-layout-1' + engine 'spec-engine-1' end # class Node2 < Zorglub::Node |