aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-09-07 13:31:27 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-09-07 13:43:55 -0300
commit77dd3be5038593f38840ff6eca55c9f0b2e12227 (patch)
treeb75851a180f932f61b951d151a2de9a84b0c9b10 /activerecord/test/cases
parentd65adc742565b6bd448179faf7edb4098db432e5 (diff)
downloadrails-77dd3be5038593f38840ff6eca55c9f0b2e12227.tar.gz
rails-77dd3be5038593f38840ff6eca55c9f0b2e12227.tar.bz2
rails-77dd3be5038593f38840ff6eca55c9f0b2e12227.zip
Fix AR tests due to builder change with nil values / empty strings
Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about that.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/xml_serialization_test.rb12
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 88751a72f9..33d510499b 100644
--- a/activerecord/test/cases/xml_serialization_test.rb
+++ b/activerecord/test/cases/xml_serialization_test.rb
@@ -130,18 +130,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
@@ -149,21 +149,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