提交 5360e474 编写于 作者: R Rick Olson

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
上级 83313fcc
......@@ -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
......
xm.hello
\ No newline at end of file
xml.test do
render :partial => 'hello', :locals => { :xm => xml }
end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册