[rspec-users] Testing return value of a block argument

Mark Wilden mark at mwilden.com
Sat Mar 21 20:25:01 EDT 2009


On Mon, Mar 16, 2009 at 4:00 AM, Yun Huang Yong <yun at nomitor.com> wrote:
>
> i.e. something like:
>  log_mock.should_receive(:debug) { |log_block|
>    # execute log_block, and check its return value
>  }

I suppose you could always look at the source code for the debug
method, find out what it does with the result of the block and set an
expectation on that behavior.

///ark


More information about the rspec-users mailing list