Your request for a request should be after any should_receive . This is a tense thing. So it kind of reads like this: "The category should get something when this happens." "This is happening" refers to the request.
it "should find the category by url" do Category.should_receive(:find).with... get "show", { your params, if you're sending some in } end
In addition, you want to go to the request method, and not the controller method itself, for this particular test.
So
post "action_name" get "action_name" update "action_name" delete "action_name"
instead
controller.action_name
source share