aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-28 07:33:54 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-28 07:33:54 +0000
commitcb0e27cee90c9417798c9d9db78dd0eb36c7fa24 (patch)
tree21283c9ada0b6d25a6f9f16b8ef3e22a2626f5d0 /actionpack/test/controller
parentfb61912798de245f22929808c11d07c612480471 (diff)
downloadrails-cb0e27cee90c9417798c9d9db78dd0eb36c7fa24.tar.gz
rails-cb0e27cee90c9417798c9d9db78dd0eb36c7fa24.tar.bz2
rails-cb0e27cee90c9417798c9d9db78dd0eb36c7fa24.zip
Fix that render :text didn't interpolate instance variables (Closes #2629, #2626) [skaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/new_render_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 24c3a0e765..919875e8c3 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -34,6 +34,11 @@ class NewRenderTestController < ActionController::Base
def render_text_hello_world
render :text => "hello world"
end
+
+ def render_text_hello_world_with_layout
+ @variable_for_layout = ", I'm here!"
+ render :text => "hello world", :layout => true
+ end
def render_custom_code
render :text => "hello world", :status => "404 Moved"
@@ -169,6 +174,7 @@ class NewRenderTestController < ActionController::Base
case action_name
when "hello_world", "layout_test", "rendering_without_layout",
"rendering_nothing_on_layout", "render_text_hello_world",
+ "render_text_hello_world_with_layout",
"partial_only", "partial_only_with_layout",
"accessing_params_in_template",
"accessing_params_in_template_with_layout",
@@ -226,6 +232,11 @@ class NewRenderTest < Test::Unit::TestCase
assert_equal "hello world", @response.body
end
+ def test_do_with_render_text_and_layout
+ get :render_text_hello_world_with_layout
+ assert_equal "<html>hello world, I'm here!</html>", @response.body
+ end
+
def test_do_with_render_custom_code
get :render_custom_code
assert_response :missing