[mocha-developer] Rails patch

James Mead jamesmead44 at gmail.com
Sun Apr 6 13:02:12 EDT 2008

I've just submitted a Rails ticket [1] which I've been meaning to submit for
ages. The associated patch makes ActiveRecord "respond_to?" dynamic finder

The idea is that some new functionality I've added to Mocha will
(optionally) allow you to get warnings or errors if you attempt to stub a
non-existent method.

With the current Rails implementation, this leads to false negatives when
you stub dynamic finder methods.

If you're using Mocha with Rails and are interested in using this Mocha
functionality, please add a "+1" in the comments on the ticket.

I suppose it would be nice to retro-fit the patch to older versions of
Rails, but I'll leave that for another day.


[1] http://dev.rubyonrails.org/ticket/11538

More information about the mocha-developer mailing list