test/unit/to_xml_test.rb in roxml-2.5.1 vs test/unit/to_xml_test.rb in roxml-2.5.2

- old
+ new

@@ -1,18 +1,18 @@ require File.join(File.dirname(__FILE__), '..', 'test_helper') -class TestHashToXml < Test::Unit::TestCase +class TestHashToXml < ActiveSupport::TestCase to_xml_test :dictionary_of_attrs, :dictionary_of_mixeds, :dictionary_of_texts, :dictionary_of_names, :dictionary_of_guarded_names, :dictionary_of_name_clashes, :dictionary_of_attr_name_clashes end -class TestOtherToXml < Test::Unit::TestCase +class TestOtherToXml < ActiveSupport::TestCase to_xml_test :book => :book_valid, :book_with_author_text_attribute => :book_text_with_attribute, :uppercase_library => :library_uppercase to_xml_test :book_with_authors, @@ -26,20 +26,20 @@ :person_with_guarded_mother => :person_with_guarded_mothers to_xml_test :book_with_wrapped_attr end -class TestToXmlWithDefaults < Test::Unit::TestCase +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 end end -class TestToXmlWithBlocks < Test::Unit::TestCase +class TestToXmlWithBlocks < ActiveSupport::TestCase def test_pagecount_serialized_properly_after_modification b = Book.from_xml(fixture(:book_valid)) xml = xml_fixture(:book_valid) assert_equal '357', xml.search('pagecount').first.content assert_equal 357, b.pages @@ -74,8 +74,8 @@ 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 end -class TestToXmlWithOverriddenOutput < Test::Unit::TestCase +class TestToXmlWithOverriddenOutput < ActiveSupport::TestCase to_xml_test :book_with_octal_pages end