diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 22:32:20 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 22:32:20 +0100 |
commit | 0ea8b5b51b5825e7c69c3b0ed1f987166de6b598 (patch) | |
tree | 1c018b00c8fe2d2c61498a089891a933a1736acd /spec/spec_helper.rb | |
parent | 0464c6ec58614e428a595d8fc1c79641774afd4c (diff) | |
download | zorglub-0ea8b5b51b5825e7c69c3b0ed1f987166de6b598.zip zorglub-0ea8b5b51b5825e7c69c3b0ed1f987166de6b598.tar.gz |
spec: add before_all and after_all specs
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f5145f1..6dc4275 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -37,15 +37,22 @@ class Node0 < Zorglub::Node end # class Node1 < Zorglub::Node - @count=0 + @before=0 + @after=0 class << self - attr_accessor :count + attr_accessor :before, :after end before_all do |node| - Node1.count +=1 + Node1.before +=1 + end + after_all do |node| + Node1.after +=1 end layout 'spec-layout-1' engine 'spec-engine-1' + def index + (self.class.before-self.class.after).should == 1 + end end # class Node2 < Zorglub::Node |