aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/render_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 9894a70755..fe59035cf4 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -89,6 +89,10 @@ class TestController < ActionController::Base
ActionView::Base.local_assigns_support_string_keys = false
end
+ def render_to_string_test
+ @foo = render_to_string :inline => "this is a test"
+ end
+
def rescue_action(e) raise end
private
@@ -209,6 +213,11 @@ class RenderTest < Test::Unit::TestCase
assert_equal "How's there? goodbyeHello: davidHello: marygoodbye\n", process_request.body
end
+ def test_render_to_string_resets_assigns
+ @request.action = "render_to_string_test"
+ assert_equal "The value of foo is: ::this is a test::\n", process_request.body
+ end
+
def test_nested_rendering
@request.action = "hello_world"
assert_equal "Living in a nested world", Fun::GamesController.process(@request, @response).body