[mocha-developer] Stubbing ActiveRecord Models gets very difficult with instance methods

Jay jay at jayfields.com
Thu Jan 4 13:23:20 EST 2007

On Jan 3, 2007, at 4:48 PM, John Pywtorak wrote:

> So, how would one go about writing
> a test for check_stat, specifically using mocha?  Also, attempting to
> eliminate all trips to the database, because testing #check_stat does
> not need it.  The db connection and all the active record magic are
> tested elsewhere right?

If you want to eliminate all trips to the database and unit test  
check_stat you can do this: http://jayfields.blogspot.com/2006/12/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mocha-developer/attachments/20070104/59e07f65/attachment.html 

More information about the mocha-developer mailing list