提交 0180e090 编写于 作者: C Carlos Antonio da Silva

Update Active Model xml serialization test to reflect a change in builder

Due to a change in builder, nil values and empty strings now generates
closed tags, so instead of this:

    <pseudonyms nil=\"true\"></pseudonyms>

It generates this:

    <pseudonyms nil=\"true\"/>

Document this change in Rails so that people can track it down easily if
necessary.
上级 a2035307
## Rails 4.0.0 (unreleased) ##
* Due to a change in builder, nil values and empty strings now generates
closed tags, so instead of this:
<pseudonyms nil=\"true\"></pseudonyms>
It generates this:
<pseudonyms nil=\"true\"/>
*Carlos Antonio da Silva*
* Changed inclusion and exclusion validators to accept a symbol for `:in` option.
This allows to use dynamic inclusion/exclusion values using methods, besides the current lambda/proc support.
......
......@@ -133,7 +133,7 @@ def setup
end
test "should serialize nil" do
assert_match %r{<pseudonyms nil=\"true\"></pseudonyms>}, @contact.to_xml(:methods => :pseudonyms)
assert_match %r{<pseudonyms nil=\"true\"/>}, @contact.to_xml(:methods => :pseudonyms)
end
test "should serialize integer" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册