aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/xml_serialization_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/xml_serialization_test.rb b/activerecord/test/cases/xml_serialization_test.rb
index 63f48865cc..39c6ea820d 100644
--- a/activerecord/test/cases/xml_serialization_test.rb
+++ b/activerecord/test/cases/xml_serialization_test.rb
@@ -31,6 +31,13 @@ class XmlSerializationTest < ActiveRecord::TestCase
assert_match %r{<created_at}, @xml
end
+ def test_should_allow_camelized_tags
+ @xml = Contact.new.to_xml :root => 'xml_contact', :camelize => true
+ assert_match %r{^<XmlContact>}, @xml
+ assert_match %r{</XmlContact>$}, @xml
+ assert_match %r{<CreatedAt}, @xml
+ end
+
def test_should_include_yielded_additions
@xml = Contact.new.to_xml do |xml|
xml.creator "David"