test/test_patch.rb in zold-0.11.14 vs test/test_patch.rb in zold-0.11.15
- old
+ new
@@ -44,12 +44,16 @@
second.sub(Zold::Amount.new(zld: 44.0), "NOPREFIX@#{Zold::Id.new}", key)
File.write(third.path, File.read(first.path))
t = third.sub(Zold::Amount.new(zld: 10.0), "NOPREFIX@#{Zold::Id.new}", key)
third.add(t.inverse(first.id))
patch = Zold::Patch.new
- patch.start(first)
- patch.join(second)
- patch.join(third)
+ begin
+ patch.join(first)
+ patch.join(second)
+ patch.join(third)
+ rescue StandardError => e
+ test_log.info("Ignore it: #{e.message}")
+ end
FileUtils.rm(first.path)
assert_equal(true, patch.save(first.path))
assert_equal(Zold::Amount.new(zld: -53.0), first.balance)
end
end