Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and_yield
not using default block argument when no argument given.
Using ruby 2.1.2 ```ruby default_arg = Object.new obj = Object.new allow(obj).to receive(:a_message).and_yield expect(default_arg).to receive(:bar) obj.a_message do |receiver=default_arg| receiver.bar end ``` The above code fails with: ``` Failure/Error: obj.a_message do |receiver=default_arg| #<Object:0x007fe3ac1ce408> yielded || to block with arity of 1 ``` The block has a arity of 0 or 1 not 1. So I would expect that when no argument is given to `and_yield` it would use the default block argument.
- Loading branch information