test/func.rb in ox-1.2.4 vs test/func.rb in ox-1.2.5
- old
+ new
@@ -302,9 +302,19 @@
#puts xml
obj = Ox.load(xml) # should convert it to an object
assert_equal("test", obj)
end
+ def test_IO
+ f = File.open("func.rb", "r")
+ assert_raise(NotImplementedError) {
+ xml = Ox.dump(f, effort: :strict)
+ }
+ xml = Ox.dump(f, effort: :tolerant)
+ obj = Ox.load(xml, mode: :object) # should convert it to an object
+ assert_equal(nil, obj)
+ end
+
end
class Bag
def initialize(args)