[rspec-users] Partial mock when a complex return value is required

Ashley Moran work at ashleymoran.me.uk
Sun Dec 17 08:19:12 EST 2006

On Dec 16, 2006, at 10:12 pm, David Chelimsky wrote:

> This is confusing to me. You say you DON'T want the method called, but
> its return value is important to the rest of the method. Please
> explain.

When you put it like that, I got confused too lol.  I just tried it  
again without the extra return value and it works fine (which makes  
sense).  I must have assumed that method was being called some other  
way... because when I wrote the spec it gave me an error about a nil  
object, but then the should_not_receive passed when I put the return  
value in.  God only knows what I wrote to do that...

Sorry for the noise!


More information about the rspec-users mailing list