diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-17 10:13:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-17 10:13:50 +0100 |
commit | 65c77e80fc100d16c51a634639032fe43f2f2908 (patch) | |
tree | c16393d2ff90b9b1907d2ae73c8b46ff7264633a /spec/node_spec.rb | |
parent | 0f1cc7ddb90c689ed4a7abc7f05cf06d3202079a (diff) | |
download | zorglub-65c77e80fc100d16c51a634639032fe43f2f2908.zip zorglub-65c77e80fc100d16c51a634639032fe43f2f2908.tar.gz |
add spec for inherited before_all and after_all hooks
Diffstat (limited to 'spec/node_spec.rb')
-rw-r--r-- | spec/node_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/node_spec.rb b/spec/node_spec.rb index 279ec2b..72230bc 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -127,6 +127,30 @@ describe Zorglub do Node3.after.should == 3 end # + it "inherited before_all hook should work" do + Node3.before = 0 + Node3.after = 0 + Node3.before.should == 0 + Node8.my_call '/index' + Node3.before.should == 1 + Node8.my_call '/index' + Node3.before.should == 2 + Node8.my_call '/index' + Node3.before.should == 3 + end + # + it "inherited after_all hook should work" do + Node3.before = 0 + Node3.after = 0 + Node3.after.should == 0 + Node8.my_call '/index' + Node3.after.should == 1 + Node8.my_call '/index' + Node3.after.should == 2 + Node8.my_call '/index' + Node3.after.should == 3 + end + # it "should find view and layout and render them" do r = Node0.my_call '/do_render' r.status.should == 200 |