[mocha-developer] Rails functional testing and Mocha
fred at 82ask.com
Mon Mar 5 06:48:48 EST 2007
On 5 Mar 2007, at 11:15, James Mead wrote:
> Hi Fred,
> It's great to see you playing around with the internals of Mocha. I
> you've been having fun!
> I use the same technique that David describes (although I'd
> probably stub
> the call to find not expect it, because its a query not a command).
> In fact I rarely use the any_instance form of stubbing. It feels a bit
> I don't think we'd want to incorporate the change you're
> suggesting, because
> (as you say) its a bit ActiveRecord-specific and there is an
> Is there anything you don't like about the technique David suggests
> stubbing the find method)?
I like it very much actually. In general though I am a little nervous
about testing everything in isolation i.e. models in their unit tests
controllers & views in their functional etc...
I like knowing that I've taken a complete path through the system.
Perhaps some of my functional tests should actually be integration
tests but that doesn't really make a distance here. I can also see it
getting a little hairy if you're faking up the finding of multiple
objects, with associations etc...
More information about the mocha-developer