Permalink
Browse files

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
  • Loading branch information...
1 parent 83313fc commit 5360e4743158c2a0eb91d73f1bcc954c2cb7f5e7 @technoweenie technoweenie committed Sep 6, 2006
@@ -60,6 +60,10 @@ def builder_layout_test
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 @@ def test_render_xml_with_default
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
@@ -0,0 +1 @@
+xm.hello
@@ -0,0 +1,3 @@
+xml.test do
+ render :partial => 'hello', :locals => { :xm => xml }
+end

0 comments on commit 5360e47

Please sign in to comment.