aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/integration_test.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-03-01 16:37:11 +0000
committerJamis Buck <jamis@37signals.com>2006-03-01 16:37:11 +0000
commitabeb77b2868d185ff7604855f2d5cf198bd9a460 (patch)
tree516a3b3959ce2a2c67849b72f2717acee45351f2 /actionpack/lib/action_controller/integration_test.rb
parent9ded584ec3d36f480be31f3937cc32d033bb2f5d (diff)
downloadrails-abeb77b2868d185ff7604855f2d5cf198bd9a460.tar.gz
rails-abeb77b2868d185ff7604855f2d5cf198bd9a460.tar.bz2
rails-abeb77b2868d185ff7604855f2d5cf198bd9a460.zip
Make TestProcess methods public for access via Integration::Session. Make return values from some of the Integration::Session methods sane.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/integration_test.rb')
-rw-r--r--actionpack/lib/action_controller/integration_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/integration_test.rb b/actionpack/lib/action_controller/integration_test.rb
index 7c7f19a238..35fec04dd3 100644
--- a/actionpack/lib/action_controller/integration_test.rb
+++ b/actionpack/lib/action_controller/integration_test.rb
@@ -72,6 +72,7 @@ module ActionController
def https!(flag=true)
@https = flag
initialize_url_writer
+ @https
end
# Return +true+ if the session is mimicing a secure HTTPS request.
@@ -89,6 +90,7 @@ module ActionController
def host!(name)
@host = name
initialize_url_writer
+ @host
end
# Follow a single redirect response. If the last response was not a
@@ -97,6 +99,7 @@ module ActionController
def follow_redirect!
raise "not a redirect! #{@status} #{@status_message}" unless redirect?
get(interpret_uri(headers["location"].first))
+ status
end
# Performs a GET request, following any subsequent redirect. Note that
@@ -106,6 +109,7 @@ module ActionController
def get_via_redirect(path, args={})
get path, args
follow_redirect! while redirect?
+ status
end
# Performs a POST request, following any subsequent redirect. This is
@@ -113,6 +117,7 @@ module ActionController
def post_via_redirect(path, args={})
post path, args
follow_redirect! while redirect?
+ status
end
# Returns +true+ if the last response was a redirect.
@@ -217,6 +222,7 @@ module ActionController
@response = @controller.response
parse_result
+ return status
end
# Parses the result of the response and extracts the various values,
@@ -254,7 +260,7 @@ module ActionController
'QUERY_STRING' => "",
"REQUEST_URI" => "/",
"HTTP_HOST" => host,
- "SERVER_PORT" => https? ? "80" : "443",
+ "SERVER_PORT" => https? ? "443" : "80",
"HTTPS" => https? ? "on" : "off")
@rewriter = ActionController::UrlRewriter.new(ActionController::CgiRequest.new(cgi), {})
end