# File lib/action_dispatch/testing/assertions/response.rb, line 28
      def assert_response(type, message = nil)
        validate_request!

        if type.in?([:success, :missing, :redirect, :error]) && @response.send("#{type}?")
          assert_block("") { true } # to count the assertion
        elsif type.is_a?(Fixnum) && @response.response_code == type
          assert_block("") { true } # to count the assertion
        elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
          assert_block("") { true } # to count the assertion
        else
          flunk(build_message(message, "Expected response to be a <?>, but was <?>", type, @response.response_code))
        end
      end