[mocha-developer] Named Scope

Duncan Beevers duncanbeevers at gmail.com
Thu Aug 14 17:25:11 EDT 2008


You can use #proxy_options on each scope to unit test the find options
applied by that scope.

As far as testing chains of scopes, I've found this is simply more
appropriate to test all the way through to the database.

On Thu, Aug 14, 2008 at 11:09 AM, Dustin Tinney <tinney at gmail.com> wrote:
> With the introduction of named scope in rails does anyone have mocha testing
> suggestions for something like this:
>
> @person.completed_moves.in_locaiton(params[:location]).in_site(params[:site]).find(:first)
>
> .dustin
>
> _______________________________________________
> mocha-developer mailing list
> mocha-developer at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mocha-developer
>


More information about the mocha-developer mailing list