[mocha-developer] Expectations on portions of arguments called.

Duncan Beevers duncanbeevers at gmail.com
Thu Sep 13 01:09:49 EDT 2007

Wow, I hadn't seen those methods before.  Those do exactly what I need
in  99% of the cases I wished I had something like this.

Still though, there are times when having access to that arguments
array to do more programmatic checking, or deeper inspection of the
argument components would be nice.

Thanks for the quick response and excellent library.

On 9/12/07, James Mead <jamesmead44 at gmail.com> wrote:
> You should be able to do this with the has_entry parameter matcher (
> http://mocha.rubyforge.org/classes/Mocha/ParameterMatchers.html#M000010)
> something like this...
> def test_referring_journals_should_order_by_citation_count
>   article = articles(:highly_cited_article)
>   Journal.expects(:find).with(:first, has_entry(:order, 'citations_count
> DESC'))
>   article.referring_journals
> end
> Let me know if I've misunderstood.
> --
> James.
> http://blog.floehopper.org
> http://tumble.floehopper.org
> _______________________________________________
> mocha-developer mailing list
> mocha-developer at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mocha-developer

More information about the mocha-developer mailing list