aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-23 08:43:01 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-23 08:43:01 +0000
commitd1725929852ab9da48f7ff7c4fa7f401ac55c331 (patch)
treec7ae66a7fd50ec9765285a226ff972bf96162625 /actionpack/test/controller/new_render_test.rb
parent023c4d68cc298f3a4e66fe5f17ca7e99547768b6 (diff)
downloadrails-d1725929852ab9da48f7ff7c4fa7f401ac55c331.tar.gz
rails-d1725929852ab9da48f7ff7c4fa7f401ac55c331.tar.bz2
rails-d1725929852ab9da48f7ff7c4fa7f401ac55c331.zip
Added test for template to layout variable transfer
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-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 105e5ec06d..8af594e94a 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -119,6 +119,10 @@ class NewRenderTestController < ActionController::Base
render :action => "potential_conflicts"
end
+ def action_talk_to_layout
+ # Action template sets variable that's picked up by layout
+ end
+
def rescue_action(e) raise end
private
@@ -133,6 +137,8 @@ class NewRenderTestController < ActionController::Base
"layouts/standard"
when "builder_layout_test"
"layouts/builder"
+ when "action_talk_to_layout"
+ "layouts/talk_from_action"
end
end
end
@@ -293,6 +299,11 @@ class NewRenderTest < Test::Unit::TestCase
assert_equal("First: David\nSecond: Stephan\nThird: David\nFourth: David\nFifth: ", @response.body)
end
+ def test_action_talk_to_layout
+ get :action_talk_to_layout
+ assert_equal "<title>Talking to the layout</title>\nAction was here!", @response.body
+ end
+
# def test_partials_list
# get :partials_list
# assert_equal "goodbyeHello: davidHello: marygoodbye\n", @response.body