aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-06-12 23:00:10 -0400
committerJosé Valim <jose.valim@gmail.com>2010-06-13 13:56:08 +0200
commite574ca920d315158a4af5c906b23ea0082c5690f (patch)
tree31db1d3d38c9d47b7a090e9f6eacdce022393aa2 /actionpack/test
parentb514b4d6962f3bb04062a900b15d2db118fa20ab (diff)
downloadrails-e574ca920d315158a4af5c906b23ea0082c5690f.tar.gz
rails-e574ca920d315158a4af5c906b23ea0082c5690f.tar.bz2
rails-e574ca920d315158a4af5c906b23ea0082c5690f.zip
render(:inline) in a layout before yield replaces original content
[#4777 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb2
-rw-r--r--actionpack/test/template/render_test.rb6
2 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb b/actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb
new file mode 100644
index 0000000000..7298d79690
--- /dev/null
+++ b/actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb
@@ -0,0 +1,2 @@
+<%= render :inline => 'welcome' %>
+<%= yield %>
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index aca96e0a24..059dcedad8 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -229,6 +229,12 @@ module RenderTestCases
@view.render(:file => "test/hello_world.erb", :layout => "layouts/yield")
end
+ def test_render_with_layout_which_has_render_inline
+ assert_equal %(welcome\nHello world!\n),
+ @view.render(:file => "test/hello_world.erb", :layout => "layouts/yield_with_render_inline_inside")
+ end
+
+
# TODO: Move to deprecated_tests.rb
def test_render_with_nested_layout_deprecated
assert_deprecated do