aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r--actionpack/lib/action_controller/new_base/base.rb1
-rw-r--r--actionpack/lib/action_controller/new_base/testing.rb9
2 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb
index 3d8f785280..142699326e 100644
--- a/actionpack/lib/action_controller/new_base/base.rb
+++ b/actionpack/lib/action_controller/new_base/base.rb
@@ -27,6 +27,7 @@ module ActionController
include ActionController::Flash
include ActionController::Verification
include ActionController::RequestForgeryProtection
+ include ActionController::Streaming
# TODO: Extract into its own module
# This should be moved together with other normalizing behavior
diff --git a/actionpack/lib/action_controller/new_base/testing.rb b/actionpack/lib/action_controller/new_base/testing.rb
index bc3bc70404..6a92c292bd 100644
--- a/actionpack/lib/action_controller/new_base/testing.rb
+++ b/actionpack/lib/action_controller/new_base/testing.rb
@@ -1,6 +1,6 @@
module ActionController
module Testing
-
+
# OMG MEGA HAX
def process_with_new_base_test(request, response)
@_request = request
@@ -20,6 +20,11 @@ module ActionController
@assigns[name] = value
end
end
-
+
+ # TODO : Rewrite tests using controller.headers= to use Rack env
+ def headers=(new_headers)
+ @_response ||= ActionDispatch::Response.new
+ @_response.headers.replace(new_headers)
+ end
end
end \ No newline at end of file