search for: yielding_method

Displaying 1 result from an estimated 1 matches for "yielding_method".

2007 Sep 21
5
Stubbing yielding methods
...http://pastie.caboo.se/99413) I tried to think about how it would work if I converted the block to a method on an object. I slightly ran out of steam on this one when I realised that in this case when I realised Executor#execute wouldn''t be called because the implementation of Collaborator#yielding_method is stubbed. This made me wonder if the Expectation#yields method should exist at all! In particular, in the block example, it feels odd because you are going from real code (ClassUnderTest) into mock code (mocked version of Collaborator) and back into real code (the block itself). I wonder if this...