[mocha-developer] With Parameter Block

Dan North dan at tastapod.com
Fri Jun 22 08:26:44 EDT 2007

James Mead wrote:
> Hi Zach,
> I'm not fixed on the idea of the block check going away. It's great to have
> your example usage. You are right that readability is one advantage of the
> parameter matcher classes, but another benefit is hopefully more useful
> error messages. Maybe the solution is to have a custom matcher which takes a
> block. What do you think?
> I'll give it some more thought.
I agree - having a custom matcher that knows about procs is a cleaner 
solution than having the whole proc thing baked into expectations. 
Expecting a proc is an edge case when you are mostly mocking services. 
It's normally simple value objects like strings that get passed in as 


More information about the mocha-developer mailing list