summary refs log tree commit diff
path: root/test/spec_bacon.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec_bacon.rb')
-rw-r--r--test/spec_bacon.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb
index 1779704..fd3e09b 100644
--- a/test/spec_bacon.rb
+++ b/test/spec_bacon.rb
@@ -278,6 +278,25 @@ describe "before/after" do
     @a.should.equal 2
     @b.should.equal 2
   end
+  
+  describe "when nested" do
+    before do
+      @c = 5
+    end
+    
+    it "should run from higher level" do
+      @a.should.equal 2
+      @b.should.equal 2
+    end
+    
+    it "should run at the nested level" do
+      @c.should.equal 5
+    end
+  end
+  
+  it "should not run from lower level" do
+    @c.should.be.nil
+  end
 end
 
 shared "a shared context" do