aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-23 09:00:05 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-23 09:00:05 +0000
commitb366dbd952417a610913e05ad58024b7da03fdb8 (patch)
tree0ca8e594c78a92cec73ca0abec49fec90d8373e3 /actionpack/test/controller/render_test.rb
parentd1725929852ab9da48f7ff7c4fa7f401ac55c331 (diff)
downloadrails-b366dbd952417a610913e05ad58024b7da03fdb8.tar.gz
rails-b366dbd952417a610913e05ad58024b7da03fdb8.tar.bz2
rails-b366dbd952417a610913e05ad58024b7da03fdb8.zip
Improved performance with 5-30% through a series of Action Pack optimizations #1811 [Stefan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r--actionpack/test/controller/render_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 82ed4d755f..0a86cc914e 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -140,17 +140,24 @@ class RenderTest < Test::Unit::TestCase
end
def test_access_to_request_in_view
+ view_internals_old_value = ActionController::Base.view_controller_internals
+
ActionController::Base.view_controller_internals = false
+ ActionController::Base.protected_variables_cache = nil
@request.action = "hello_world"
response = process_request
assert_nil response.template.assigns["request"]
ActionController::Base.view_controller_internals = true
+ ActionController::Base.protected_variables_cache = nil
@request.action = "hello_world"
response = process_request
- assert_kind_of ActionController::AbstractRequest, response.template.assigns["request"]
+ assert_kind_of ActionController::AbstractRequest, response.template.assigns["request"]
+
+ ActionController::Base.view_controller_internals = view_internals_old_value
+ ActionController::Base.protected_variables_cache = nil
end
def test_render_xml