aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/render_test.rb
diff options
context:
space:
mode:
authorAnton Astashov <anton@astashov.net>2011-02-03 19:09:21 +0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-02-03 12:55:32 -0200
commitc1c6f29214d3c280f5d1d4abb49d0b90424fcbd7 (patch)
tree4d4e0665c1a53e62ed64ec61a816bc3ff60c327b /actionpack/test/template/render_test.rb
parente89ba63b885b4b8e65d0516b568c0057a3847b7c (diff)
downloadrails-c1c6f29214d3c280f5d1d4abb49d0b90424fcbd7.tar.gz
rails-c1c6f29214d3c280f5d1d4abb49d0b90424fcbd7.tar.bz2
rails-c1c6f29214d3c280f5d1d4abb49d0b90424fcbd7.zip
Add a test for 'render :layout'
To make sure it will show block contents if it is placed after 'render :partial' [#5557 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test/template/render_test.rb')
-rw-r--r--actionpack/test/template/render_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index e02d69231f..034fb6c210 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -209,6 +209,11 @@ module RenderTestCases
@view.formats = nil
end
+ def test_render_layout_with_block_and_other_partial_inside
+ render = @view.render(:layout => "test/layout_with_partial_and_yield.html.erb") { "Yield!" }
+ assert_equal "Before\npartial html\nYield!\nAfter\n", render
+ end
+
def test_render_inline
assert_equal "Hello, World!", @view.render(:inline => "Hello, World!")
end