test/test_roxml.rb in roxml-1.1 vs test/test_roxml.rb in roxml-1.2
- old
+ new
@@ -77,10 +77,18 @@
assert(expected_contributors.include?(contributor.name))
end
end
end
+ def test_text_modificatoin
+ person = Person.parse(fixture(:person))
+ assert_equal("Ben Franklin", person.name)
+ person.name = "Fred"
+ xml=person.to_xml.to_s
+ assert(/Fred/=~xml)
+ end
+
# Verify that an exception is thrown when two accessors have the same
# name in a ROXML class.
def test_duplicate_accessor
begin
klass = Class.new do
@@ -92,6 +100,6 @@
raise "Defining a class with multiple accessors with same name should fail."
rescue
# Ok we should fail.
end
end
-end
\ No newline at end of file
+end