On Mon, Mar 3, 2008 at 5:22 AM, Namrata Tiwari <[EMAIL PROTECTED]> wrote: > > > > > If the code is the same as it was in the first post in this thread, > > it's because the action is taking place before setting the > > expectations. > > Yes, it is the same. As you have suggested earlier. > I am pasting the spec again. > > > #list > it "should list all articles" do > articles = mock("articles") > articles.should_receive(:paginate).with(:order => "live_on DESC", > :conditions => { :type_for => "blog" }) > controller.should_receive(:find_city).and_return(articles) > response.should be_success > get :list > > end
That is NOT the same :) In the initial post the first line was 'get :list' - now that is the last line. So while you're at it, please post the action again as well. > > > > Thx, > Namrata. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users