[rspec-users] mock assertions on block parameters

Ben Butler-Cole ben at bridesmere.com
Mon Jun 7 11:52:52 EDT 2010


On 7 June 2010 16:34, Matt Wynne <matt at mattwynne.net> wrote:

I'm still not quite clear what you're trying to achieve. Do you want to
> assert that a specific block is passed to the collaborator, or do you want
> to assert that any old block with a particular behaviour is passed to the
> collaborator?
>
> If it's the former, you can test it by creating a test double for the
> block, and asserting that it's passed to the collaborator
>

The later. The block gets created by the code under test, so I can't create
a double for it.

-Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100607/3eb1c41c/attachment.html>


More information about the rspec-users mailing list