diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2014-07-07 16:19:29 -0700 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2014-07-07 16:19:29 -0700 |
commit | 678ed4d6818e870de46ed91bd084889bed80c16d (patch) | |
tree | 42c84d8c634affed7ac9bbf3ef9e2c8f2921c9ac /lib | |
parent | dc7f88f6ff21b43958c10f91f555cd8056b9f7e0 (diff) | |
download | bacon-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 'lib')
-rw-r--r-- | lib/bacon.rb | 4 |
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) } |