aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/testing
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-01-27 18:54:01 -0600
committerJoshua Peek <josh@joshpeek.com>2009-01-27 18:54:01 -0600
commit319ae4628f4e0058de3e40e4ca7791b17e45e70c (patch)
treee5da1bfe6dd69a9cf483c9ff9fd18c5bfdd2f463 /actionpack/lib/action_controller/testing
parenta0f2b1d95d3785de92ae271fd7ea23e91c0cadc6 (diff)
downloadrails-319ae4628f4e0058de3e40e4ca7791b17e45e70c.tar.gz
rails-319ae4628f4e0058de3e40e4ca7791b17e45e70c.tar.bz2
rails-319ae4628f4e0058de3e40e4ca7791b17e45e70c.zip
Move HTTP libs and middleware into ActionDispatch component
Diffstat (limited to 'actionpack/lib/action_controller/testing')
-rw-r--r--actionpack/lib/action_controller/testing/assertions/response.rb4
-rw-r--r--actionpack/lib/action_controller/testing/integration.rb6
-rw-r--r--actionpack/lib/action_controller/testing/process.rb4
3 files changed, 7 insertions, 7 deletions
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!