Integration test methods such as ActionDispatch::Integration::Session#get and ActionDispatch::Integration::Session#post return objects of class TestResponse, which represent the HTTP response results of the requested controller actions.
See Response for more information on controller response objects.
Was there a client client?
# File lib/action_dispatch/testing/test_response.rb, line 132 def client_error? (400..499).include?(response_code) end
Was there a server-side error?
# File lib/action_dispatch/testing/test_response.rb, line 126 def error? (500..599).include?(response_code) end
Was the URL not found?
# File lib/action_dispatch/testing/test_response.rb, line 116 def missing? response_code == 404 end
Generated with the Darkfish Rdoc Generator 2.