aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
authorRyan Bates <ryan@railscasts.com>2008-08-17 19:29:24 -0500
committerJoshua Peek <josh@joshpeek.com>2008-08-17 19:29:24 -0500
commit38c7d73e73d569211c4dfadf96fc295a925b7c9c (patch)
tree9400fbbd277dafdde822fb9d3968f30764dbe9da /actionpack/test/controller/new_render_test.rb
parentdbb0abfb7e9eb9a63b721a38625e3eff66ced49d (diff)
downloadrails-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.rb9
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