Flowdock
method

process_controller_response

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: ActionController::TestCase::Behavior
process_controller_response(action, cookies, xhr) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/test_case.rb, line 574
        def process_controller_response(action, cookies, xhr)
          begin
            @controller.recycle!
            @controller.dispatch(action, @request, @response)
          ensure
            @request = @controller.request
            @response = @controller.response

            if @request.have_cookie_jar?
              unless @request.cookie_jar.committed?
                @request.cookie_jar.write(@response)
                cookies.update(@request.cookie_jar.instance_variable_get(:@cookies))
              end
            end
            @response.prepare!

            if flash_value = @request.flash.to_session_value
              @request.session["flash"] = flash_value
            else
              @request.session.delete("flash")
            end

            if xhr
              @request.delete_header "HTTP_X_REQUESTED_WITH"
              @request.delete_header "HTTP_ACCEPT"
            end
            @request.query_string = ""

            @response.sent!
          end

          @response
        end
Register or log in to add new notes.