it "should call display with an object" do dispatch_to(YourController, :your_action, { :id => "funky" }) do |c| c.should_receive(:display).with({ :id => "funky" }) endenddef your_action display paramsend