aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-05-02 14:23:44 -0500
committerJoshua Peek <josh@joshpeek.com>2009-05-02 14:23:44 -0500
commit3900f4007ee6463b8936af23c04017a900673866 (patch)
tree216e69d5b5426702fe7009f3203ee897e5f92bc2 /actionpack/lib/action_controller
parent3be3470fab788856b4559742434f195cc6b1009a (diff)
downloadrails-3900f4007ee6463b8936af23c04017a900673866.tar.gz
rails-3900f4007ee6463b8936af23c04017a900673866.tar.bz2
rails-3900f4007ee6463b8936af23c04017a900673866.zip
Deprecate assert_redirect_to's partial hash matching
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/base/base.rb1
-rw-r--r--actionpack/lib/action_controller/base/redirect.rb4
-rw-r--r--actionpack/lib/action_controller/testing/process.rb18
3 files changed, 9 insertions, 14 deletions
diff --git a/actionpack/lib/action_controller/base/base.rb b/actionpack/lib/action_controller/base/base.rb
index 99b5963891..ef97986c0e 100644
--- a/actionpack/lib/action_controller/base/base.rb
+++ b/actionpack/lib/action_controller/base/base.rb
@@ -820,7 +820,6 @@ module ActionController #:nodoc:
@template = ActionView::Base.new(self.class.view_paths, {}, self, formats)
response.template = @template if response.respond_to?(:template=)
@template.helpers.send :include, self.class.master_helper_module
- response.redirected_to = nil
@performed_render = @performed_redirect = false
end
diff --git a/actionpack/lib/action_controller/base/redirect.rb b/actionpack/lib/action_controller/base/redirect.rb
index 2e92117e7c..4849caac0a 100644
--- a/actionpack/lib/action_controller/base/redirect.rb
+++ b/actionpack/lib/action_controller/base/redirect.rb
@@ -48,8 +48,6 @@ module ActionController
status = 302
end
- response.redirected_to = options
-
case options
# The scheme name consist of a letter followed by any combination of
# letters, digits, and the plus ("+"), period ("."), or hyphen ("-")
@@ -82,8 +80,6 @@ module ActionController
# The response body is not reset here, see +erase_render_results+
def erase_redirect_results #:nodoc:
@performed_redirect = false
- response.redirected_to = nil
- response.redirected_to_method_params = nil
response.status = DEFAULT_RENDER_STATUS_CODE
response.headers.delete('Location')
end
diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb
index 8315a160ad..f62d18a1f9 100644
--- a/actionpack/lib/action_controller/testing/process.rb
+++ b/actionpack/lib/action_controller/testing/process.rb
@@ -45,17 +45,16 @@ module ActionController #:nodoc:
end
end
- # Integration test methods such as ActionController::Integration::Session#get
- # and ActionController::Integration::Session#post return objects of class
- # TestResponse, which represent the HTTP response results of the requested
- # controller actions.
- #
- # See Response for more information on controller response objects.
class TestResponse < ActionDispatch::TestResponse
def recycle!
- body_parts.clear
- headers.delete('ETag')
- headers.delete('Last-Modified')
+ @status = 200
+ @header = Rack::Utils::HeaderHash.new(DEFAULT_HEADERS)
+ @writer = lambda { |x| @body << x }
+ @block = nil
+ @length = 0
+ @body = []
+
+ @request = @template = nil
end
end
@@ -132,6 +131,7 @@ module ActionController #:nodoc:
build_request_uri(action, parameters)
Base.class_eval { include ProcessWithTest } unless Base < ProcessWithTest
+
@controller.process(@request, @response)
end