Neil Cauldwell <[EMAIL PROTECTED]> writes: > Is my stubbing breaking this? I hope not because Thinking SPhinx isn't > determining the scope of the search in relation to the 'active' state of > the users; the search is built on top of a named scope on the User > model; > > # GET /searches/people > # GET /searches/people.xml > def people > @results = User.active.search params[:search], :page => > params[:page], :per_page => 15 > > respond_to do |format| > format.html > format.xml { render :xml => @results } > end > end > > Cheers
You're stubbing User.search, but you don't actually call it. search ends up being called on a named_scope collection proxy. So I think that this is using the real implementation of both active and search. I never saw you post a failure message, so I'm not actually sure what problem you're having. A failure message would be helpful. Pat _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users