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

David Chelimsky dchelimsky at gmail.com
Sun Dec 17 09:03:46 EST 2006


On 12/17/06, Ashley Moran <work at ashleymoran.me.uk> wrote:
>
> 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!

No worries. Glad it's resolved.

Cheers,
David

>
> Ashley
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list