diff options
author | Vipul A M <vipulnsward@gmail.com> | 2013-07-01 10:17:33 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2013-07-01 10:17:33 +0530 |
commit | 404a61e19c54ecb681ffb9152cd3c873121948fe (patch) | |
tree | c90b1c295a7e483fa5bb58c80a18d235dfdfc049 /activemodel | |
parent | 18099b0672ff6df6c649f00d87a92ac28ce8d8e7 (diff) | |
download | rails-404a61e19c54ecb681ffb9152cd3c873121948fe.tar.gz rails-404a61e19c54ecb681ffb9152cd3c873121948fe.tar.bz2 rails-404a61e19c54ecb681ffb9152cd3c873121948fe.zip |
Remove redundant escapes from xml serialization test
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/serializers/xml_serialization_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/test/cases/serializers/xml_serialization_test.rb b/activemodel/test/cases/serializers/xml_serialization_test.rb index 901f42f29b..c4cfb0c255 100644 --- a/activemodel/test/cases/serializers/xml_serialization_test.rb +++ b/activemodel/test/cases/serializers/xml_serialization_test.rb @@ -130,7 +130,7 @@ class XmlSerializationTest < ActiveModel::TestCase end test "should serialize nil" do - assert_match %r{<pseudonyms nil=\"true\"/>}, @contact.to_xml(methods: :pseudonyms) + assert_match %r{<pseudonyms nil="true"/>}, @contact.to_xml(methods: :pseudonyms) end test "should serialize integer" do @@ -138,23 +138,23 @@ class XmlSerializationTest < ActiveModel::TestCase end test "should serialize datetime" do - assert_match %r{<created-at type=\"dateTime\">2006-08-01T00:00:00Z</created-at>}, @contact.to_xml + assert_match %r{<created-at type="dateTime">2006-08-01T00:00:00Z</created-at>}, @contact.to_xml end test "should serialize boolean" do - assert_match %r{<awesome type=\"boolean\">false</awesome>}, @contact.to_xml + assert_match %r{<awesome type="boolean">false</awesome>}, @contact.to_xml end test "should serialize array" do - assert_match %r{<social type=\"array\">\s*<social>twitter</social>\s*<social>github</social>\s*</social>}, @contact.to_xml(methods: :social) + assert_match %r{<social type="array">\s*<social>twitter</social>\s*<social>github</social>\s*</social>}, @contact.to_xml(methods: :social) end test "should serialize hash" do - assert_match %r{<network>\s*<git type=\"symbol\">github</git>\s*</network>}, @contact.to_xml(methods: :network) + assert_match %r{<network>\s*<git type="symbol">github</git>\s*</network>}, @contact.to_xml(methods: :network) end test "should serialize yaml" do - assert_match %r{<preferences type=\"yaml\">--- !ruby/struct:Customer(\s*)\nname: John\n</preferences>}, @contact.to_xml + assert_match %r{<preferences type="yaml">--- !ruby/struct:Customer(\s*)\nname: John\n</preferences>}, @contact.to_xml end test "should call proc on object" do |