summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-03 16:27:17 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-03 16:27:17 +0100
commit2d436f39dfa9e83aac07920875241fad44af2a74 (patch)
treeaf74ad39979a7251c7fe069169b3857843379834
parent7b9bb83a925a9df103de4eb533872ead7f45bb29 (diff)
downloadzorglub-2d436f39dfa9e83aac07920875241fad44af2a74.zip
zorglub-2d436f39dfa9e83aac07920875241fad44af2a74.tar.gz
spec: merge SpecNode within Node1
-rw-r--r--spec/node_spec.rb10
-rw-r--r--spec/spec_helper.rb24
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