diff options
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 0a86cc914e..cd7c32e0a2 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -75,6 +75,11 @@ class TestController < ActionController::Base render_template "Hello: <%= params[:name] %>" end + def accessing_local_assigns_in_inline_template + name = params[:local_name] + render :inline => "<%= 'Goodbye, ' + local_name %>", :locals => { :local_name => name } + end + def rescue_action(e) raise end private @@ -206,6 +211,12 @@ class RenderTest < Test::Unit::TestCase assert_equal "Hello: David", process_request.body end + def test_accessing_local_assigns_in_inline_template + @request.action = "accessing_local_assigns_in_inline_template" + @request.query_parameters[:local_name] = "Local David" + assert_equal "Goodbye, Local David", process_request.body + end + private def process_request TestController.process(@request, @response) |