    # File lib/merb-core/test/helpers/mock_request_helper.rb, line 330
          def mock_request(path, params = {}, env= {}, &block)
            env[:request_method] ||= "GET"
            env[:request_uri], env[:query_string] = path.split('?')

            multipart = env.delete(:test_with_multipart)

            request = build_request(params, env)

            opts = check_request_for_route(request) # Check that the request will be routed correctly
            controller_name = (opts[:namespace] ? opts.delete(:namespace) + '/' : '') + opts.delete(:controller)
            klass = Object.full_const_get(controller_name.snake_case.to_const_string)

            action = opts.delete(:action).to_s
            params.merge!(opts)

            multipart.nil? ? dispatch_to(klass, action, params, env, &block) : dispatch_multipart_to(klass, action, params, env, &block)
          end