From 319ae4628f4e0058de3e40e4ca7791b17e45e70c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 27 Jan 2009 18:54:01 -0600 Subject: Move HTTP libs and middleware into ActionDispatch component --- actionpack/lib/action_controller/testing/assertions/response.rb | 4 ++-- actionpack/lib/action_controller/testing/integration.rb | 6 +++--- actionpack/lib/action_controller/testing/process.rb | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_controller/testing') diff --git a/actionpack/lib/action_controller/testing/assertions/response.rb b/actionpack/lib/action_controller/testing/assertions/response.rb index 5976090273..ca0a9bbf52 100644 --- a/actionpack/lib/action_controller/testing/assertions/response.rb +++ b/actionpack/lib/action_controller/testing/assertions/response.rb @@ -11,7 +11,7 @@ module ActionController # # You can also pass an explicit status number like assert_response(501) # or its symbolic equivalent assert_response(:not_implemented). - # See ActionController::StatusCodes for a full list. + # See ActionDispatch::StatusCodes for a full list. # # ==== Examples # @@ -27,7 +27,7 @@ module ActionController 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 == ActionController::StatusCodes::SYMBOL_TO_STATUS_CODE[type] + elsif type.is_a?(Symbol) && @response.response_code == ActionDispatch::StatusCodes::SYMBOL_TO_STATUS_CODE[type] assert_block("") { true } # to count the assertion else if @response.error? diff --git a/actionpack/lib/action_controller/testing/integration.rb b/actionpack/lib/action_controller/testing/integration.rb index 163ba84a3e..0da23f9dc8 100644 --- a/actionpack/lib/action_controller/testing/integration.rb +++ b/actionpack/lib/action_controller/testing/integration.rb @@ -316,7 +316,7 @@ module ActionController @html_document = nil @status = status.to_i - @status_message = StatusCodes::STATUS_CODES[@status] + @status_message = ActionDispatch::StatusCodes::STATUS_CODES[@status] @headers = Rack::Utils::HeaderHash.new(headers) @@ -335,7 +335,7 @@ module ActionController else # Decorate responses from Rack Middleware and Rails Metal # as an Response for the purposes of integration testing - @response = Response.new + @response = ActionDispatch::Response.new @response.status = status.to_s @response.headers.replace(@headers) @response.body = @body @@ -374,7 +374,7 @@ module ActionController "SERVER_PORT" => https? ? "443" : "80", "HTTPS" => https? ? "on" : "off" } - UrlRewriter.new(Request.new(env), {}) + UrlRewriter.new(ActionDispatch::Request.new(env), {}) end def name_with_prefix(prefix, name) diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb index 22b97fc157..199ffb702c 100644 --- a/actionpack/lib/action_controller/testing/process.rb +++ b/actionpack/lib/action_controller/testing/process.rb @@ -1,5 +1,5 @@ module ActionController #:nodoc: - class TestRequest < Request #:nodoc: + class TestRequest < ActionDispatch::Request #:nodoc: attr_accessor :cookies, :session_options attr_accessor :query_parameters, :path, :session attr_accessor :host @@ -270,7 +270,7 @@ module ActionController #:nodoc: # controller actions. # # See Response for more information on controller response objects. - class TestResponse < Response + class TestResponse < ActionDispatch::Response include TestResponseBehavior def recycle! -- cgit v1.2.3