RunTimeError: ActionController::RackDelegation in rspec 2.10.1 for rails 3.1.4 application controller
问题 In our rails 3.1.4 app, rspec is used to test the public method require_signin in application controller. Here is the method require_signin: def require_signin if !signed_in? flash.now.alert = "Log in first!" redirect_to signin_path end end Here is the rspec code: it "should invoke require_signin for those without login" do controller.send(:require_signin) controller {should redirect_to signin_path} end The above rspec generates gigantic multi pages error starting like the below: RuntimeError