test/test_roxml.rb in roxml-1.0 vs test/test_roxml.rb in roxml-1.1

- old
+ new

@@ -10,9 +10,16 @@ def test_valid_simple book = Book.parse(fixture(:book_valid)) assert_equal("The PickAxe", book.title) end + # Test book with text and attribute + def test_book_author_text_attribute + book = BookWithAuthorTextAttribute.parse(fixture(:book_text_with_attribute)) + assert_equal("primary",book.author.role) + assert_equal("David Thomas",book.author.text) + end + # Malformed XML parsing should throw REXML::ParseException def test_malformed begin book = Book.parse(fixture(:book_malformed)) fail() \ No newline at end of file