aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
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