Permalink
Browse files

Update Active Model xml serialization test to reflect a change in bui…

…lder

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.

Conflicts:
	activemodel/CHANGELOG.md
  • Loading branch information...
carlosantoniodasilva committed Sep 7, 2012
1 parent 5054e26 commit d65adc742565b6bd448179faf7edb4098db432e5
Showing with 14 additions and 1 deletion.
  1. +13 −0 activemodel/CHANGELOG.md
  2. +1 −1 activemodel/test/cases/serializers/xml_serialization_test.rb
View
@@ -1,3 +1,16 @@
+## Rails 3.2.9 (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*
+
## Rails 3.2.8 (Aug 9, 2012) ##
* No changes.
@@ -132,7 +132,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

0 comments on commit d65adc7

Please sign in to comment.