aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-05-21 21:48:26 +0200
committerPratik Naik <pratiknaik@gmail.com>2009-05-21 21:48:42 +0200
commit386ff66e5ed4fbe1e060610d4226a4eb22dca766 (patch)
tree4ada983959c4072a2f37c83a3317c4291c36171b /actionpack/lib/action_controller/new_base
parent59b32f2883b58a1e7bf2c246801a605b673e3fb6 (diff)
downloadrails-386ff66e5ed4fbe1e060610d4226a4eb22dca766.tar.gz
rails-386ff66e5ed4fbe1e060610d4226a4eb22dca766.tar.bz2
rails-386ff66e5ed4fbe1e060610d4226a4eb22dca766.zip
Add Streaming to new base
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