diff options
-rw-r--r-- | actionpack/test/controller/render_test.rb | 9 | ||||
-rw-r--r-- | actionpack/test/fixtures/test/_hello.rxml | 1 | ||||
-rw-r--r-- | actionpack/test/fixtures/test/hello_world_container.rxml | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index c22702acd0..23f90c6243 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -60,6 +60,10 @@ class TestController < ActionController::Base render_action "hello" end + def builder_partial_test + render_action "hello_world_container" + end + def partials_list @test_unchanged = 'hello' @customers = [ Customer.new("david"), Customer.new("mary") ] @@ -193,6 +197,11 @@ class RenderTest < Test::Unit::TestCase assert_equal "<p>This is grand!</p>\n", @response.body end + def test_render_xml_with_partial + get :builder_partial_test + assert_equal "<test>\n <hello/>\n</test>\n", @response.body + end + def test_layout_rendering get :layout_test assert_equal "<html>Hello world!</html>", @response.body diff --git a/actionpack/test/fixtures/test/_hello.rxml b/actionpack/test/fixtures/test/_hello.rxml new file mode 100644 index 0000000000..ef52f632d1 --- /dev/null +++ b/actionpack/test/fixtures/test/_hello.rxml @@ -0,0 +1 @@ +xm.hello
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/hello_world_container.rxml b/actionpack/test/fixtures/test/hello_world_container.rxml new file mode 100644 index 0000000000..e48d75c405 --- /dev/null +++ b/actionpack/test/fixtures/test/hello_world_container.rxml @@ -0,0 +1,3 @@ +xml.test do + render :partial => 'hello', :locals => { :xm => xml } +end
\ No newline at end of file |