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
This commit is contained in:
Rick Olson
2006-09-06 03:51:45 +00:00
parent 83313fccc0
commit 5360e47431
3 changed files with 13 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1 @@
xm.hello

View File

@@ -0,0 +1,3 @@
xml.test do
render :partial => 'hello', :locals => { :xm => xml }
end