summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-11 14:26:22 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-11 14:26:22 +0200
commit775579a815a2e5dec3cf22736684fa3e92d1379c (patch)
treea6b1285f3c8b88552ed60f3fb1bba3075db811b8 /lib
parentb376384e7a0ff617bd61ef5340dfae60eadb0d3c (diff)
parent678ed4d6818e870de46ed91bd084889bed80c16d (diff)
downloadbacon-775579a815a2e5dec3cf22736684fa3e92d1379c.tar.gz
bacon-775579a815a2e5dec3cf22736684fa3e92d1379c.tar.xz
bacon-775579a815a2e5dec3cf22736684fa3e92d1379c.zip
Merge pull request #22 from godfat/pass-the-block
The methods in describe should also pass the block
Diffstat (limited to 'lib')
-rw-r--r--lib/bacon.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb
index 8d5e099..045a910 100644
--- a/lib/bacon.rb
+++ b/lib/bacon.rb
@@ -218,8 +218,8 @@ module Bacon
     def describe(*args, &block)
       context = Bacon::Context.new(args.join(' '), &block)
       (parent_context = self).methods(false).each {|e|
-        (class << context; self; end).send(:define_method, e) { |*args2|
-          parent_context.send(e, *args2)
+        (class << context; self; end).send(:define_method, e) { |*args2, &block2|
+          parent_context.send(e, *args2, &block2)
         }
       }
       @before.each { |b| context.before(&b) }