diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-09-07 13:31:27 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-09-07 13:31:28 -0300 |
commit | ba4a6c296e2283501494e1608be238f30444e1fc (patch) | |
tree | 8e714604b5c1c80a3857de0ef92050d0286238a5 | |
parent | 29fe06577f27c37a7ee29861ddd5f79e8ea61d90 (diff) | |
download | rails-ba4a6c296e2283501494e1608be238f30444e1fc.tar.gz rails-ba4a6c296e2283501494e1608be238f30444e1fc.tar.bz2 rails-ba4a6c296e2283501494e1608be238f30444e1fc.zip |
Fix AR tests due to builder change with nil values / empty strings
Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about
that.
-rw-r--r-- | activerecord/test/cases/xml_serialization_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/xml_serialization_test.rb b/activerecord/test/cases/xml_serialization_test.rb index 7249ae9e4d..68fa15de50 100644 --- a/activerecord/test/cases/xml_serialization_test.rb +++ b/activerecord/test/cases/xml_serialization_test.rb @@ -185,18 +185,18 @@ class NilXmlSerializationTest < ActiveRecord::TestCase end def test_should_serialize_string - assert_match %r{<name nil="true"></name>}, @xml + assert_match %r{<name nil="true"/>}, @xml end def test_should_serialize_integer - assert %r{<age (.*)></age>}.match(@xml) + assert %r{<age (.*)/>}.match(@xml) attributes = $1 assert_match %r{nil="true"}, attributes assert_match %r{type="integer"}, attributes end def test_should_serialize_binary - assert %r{<avatar (.*)></avatar>}.match(@xml) + assert %r{<avatar (.*)/>}.match(@xml) attributes = $1 assert_match %r{type="binary"}, attributes assert_match %r{encoding="base64"}, attributes @@ -204,21 +204,21 @@ class NilXmlSerializationTest < ActiveRecord::TestCase end def test_should_serialize_datetime - assert %r{<created-at (.*)></created-at>}.match(@xml) + assert %r{<created-at (.*)/>}.match(@xml) attributes = $1 assert_match %r{nil="true"}, attributes assert_match %r{type="dateTime"}, attributes end def test_should_serialize_boolean - assert %r{<awesome (.*)></awesome>}.match(@xml) + assert %r{<awesome (.*)/>}.match(@xml) attributes = $1 assert_match %r{type="boolean"}, attributes assert_match %r{nil="true"}, attributes end def test_should_serialize_yaml - assert_match %r{<preferences nil=\"true\"></preferences>}, @xml + assert_match %r{<preferences nil=\"true\"/>}, @xml end end |