From e625d276334bbfd1f0bc4359be2eea9fb75ae36a Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sun, 16 Oct 2005 00:04:33 +0000 Subject: Add temporary support for passing locals to render using string keys git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/render_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index cd7c32e0a2..f7cf77c204 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -79,6 +79,11 @@ class TestController < ActionController::Base name = params[:local_name] render :inline => "<%= 'Goodbye, ' + local_name %>", :locals => { :local_name => name } end + + def accessing_local_assigns_in_inline_template_with_string_keys + name = params[:local_name] + render :inline => "<%= 'Goodbye, ' + local_name %>", :locals => { "local_name" => name } + end def rescue_action(e) raise end @@ -216,6 +221,12 @@ class RenderTest < Test::Unit::TestCase @request.query_parameters[:local_name] = "Local David" assert_equal "Goodbye, Local David", process_request.body end + + def test_accessing_local_assigns_in_inline_template_with_string_keys + @request.action = "accessing_local_assigns_in_inline_template_with_string_keys" + @request.query_parameters[:local_name] = "Local David" + assert_equal "Goodbye, Local David", process_request.body + end private def process_request -- cgit v1.2.3