see http://stackoverflow.com/questions/7448974/how-to-stub-applicationcontroller-method-in-request-spec for more information about the syntax of stubbing a method.