On 06/04/2008, James Mead <jamesmead44 at gmail.com>
wrote:>
> 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 methods.
>
> 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.
Looks like it has already been committed [1]. Thanks.
--
James.
http://blog.floehopper.org
http://tumble.floehopper.org
[1] http://dev.rubyonrails.org/changeset/9235