test/unit/to_xml_test.rb in roxml-2.5.3 vs test/unit/to_xml_test.rb in roxml-3.1.0

- old
+ new

@@ -1,6 +1,6 @@ -require File.join(File.dirname(__FILE__), '..', 'test_helper') +require 'test/test_helper' class TestHashToXml < ActiveSupport::TestCase to_xml_test :dictionary_of_attrs, :dictionary_of_mixeds, :dictionary_of_texts, @@ -31,11 +31,11 @@ class TestToXmlWithDefaults < ActiveSupport::TestCase def test_content_and_attr_defaults_are_represented_in_output dict = Person.from_xml(fixture(:nameless_ageless_youth)) xml = '<person age="21">Unknown</person>' - assert_equal ROXML::XML::Parser.parse(xml).root, dict.to_xml + assert_equal ROXML::XML::Parser.parse(xml).root.to_s, dict.to_xml.to_s end end class TestToXmlWithBlocks < ActiveSupport::TestCase def test_pagecount_serialized_properly_after_modification @@ -71,10 +71,10 @@ class BookWithOctalPages include ROXML xml_accessor :pages_with_to_xml_proc, :as => Integer, :to_xml => proc {|val| sprintf("%#o", val) }, :required => true - xml_accessor :pages_with_type, OctalInteger, :required => true + xml_accessor :pages_with_type, :as => OctalInteger, :required => true end class TestToXmlWithOverriddenOutput < ActiveSupport::TestCase to_xml_test :book_with_octal_pages end