diff options
author | Ryan Bates <ryan@railscasts.com> | 2008-08-17 19:29:24 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-17 19:29:24 -0500 |
commit | 38c7d73e73d569211c4dfadf96fc295a925b7c9c (patch) | |
tree | 9400fbbd277dafdde822fb9d3968f30764dbe9da /actionpack/test/controller/new_render_test.rb | |
parent | dbb0abfb7e9eb9a63b721a38625e3eff66ced49d (diff) | |
download | rails-38c7d73e73d569211c4dfadf96fc295a925b7c9c.tar.gz rails-38c7d73e73d569211c4dfadf96fc295a925b7c9c.tar.bz2 rails-38c7d73e73d569211c4dfadf96fc295a925b7c9c.zip |
pass yielded arguments to block for ActionView::Base#render with :layout [#847 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index be99350cd2..82919b7777 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -435,6 +435,10 @@ class NewRenderTestController < ActionController::Base render :action => "using_layout_around_block" end + def render_using_layout_around_block_with_args + render :action => "using_layout_around_block_with_args" + end + def render_using_layout_around_block_in_main_layout_and_within_content_for_layout render :action => "using_layout_around_block" end @@ -969,4 +973,9 @@ EOS get :render_using_layout_around_block_in_main_layout_and_within_content_for_layout assert_equal "Before (Anthony)\nInside from first block in layout\nAfter\nBefore (David)\nInside from block\nAfter\nBefore (Ramm)\nInside from second block in layout\nAfter\n", @response.body end + + def test_using_layout_around_block_with_args + get :render_using_layout_around_block_with_args + assert_equal "Before\narg1arg2\nAfter", @response.body + end end |