summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2014-07-07 16:19:29 -0700
committerLin Jen-Shin <godfat@godfat.org>2014-07-07 16:19:29 -0700
commit678ed4d6818e870de46ed91bd084889bed80c16d (patch)
tree42c84d8c634affed7ac9bbf3ef9e2c8f2921c9ac /test
parentdc7f88f6ff21b43958c10f91f555cd8056b9f7e0 (diff)
downloadbacon-678ed4d6818e870de46ed91bd084889bed80c16d.tar.gz
bacon-678ed4d6818e870de46ed91bd084889bed80c16d.tar.xz
bacon-678ed4d6818e870de46ed91bd084889bed80c16d.zip
The methods in describe should also pass the block
for the nested describe block.
Diffstat (limited to 'test')
-rw-r--r--test/spec_bacon.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb
index 2d1ceef..e3e288e 100644
--- a/test/spec_bacon.rb
+++ b/test/spec_bacon.rb
@@ -375,6 +375,10 @@ describe "Methods" do
     42
   end
 
+  def the_towels
+    yield "DON'T PANIC"
+  end
+
   it "should be accessible in a test" do
     the_meaning_of_life.should == 42
   end
@@ -383,6 +387,12 @@ describe "Methods" do
     it "should be accessible in a test" do
       the_meaning_of_life.should == 42
     end
+
+    it "should pass the block" do
+      the_towels do |label|
+        label.should == "DON'T PANIC"
+      end.should == true
+    end
   end
 end