diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-09-06 03:51:45 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-09-06 03:51:45 +0000 |
commit | 5360e4743158c2a0eb91d73f1bcc954c2cb7f5e7 (patch) | |
tree | 2998d5acde3f11738c055b3740c88bc99d09993a /actionpack | |
parent | 83313fccc04f659b766a8f5e8bcf4a5cb67a8b2a (diff) | |
download | rails-5360e4743158c2a0eb91d73f1bcc954c2cb7f5e7.tar.gz rails-5360e4743158c2a0eb91d73f1bcc954c2cb7f5e7.tar.bz2 rails-5360e4743158c2a0eb91d73f1bcc954c2cb7f5e7.zip |
added passing test for using partials with an xml builder
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-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 |