Sha256: ccae20fd1f6fdc499ba3240d2d73cbc36192b215ac36adf1e687ff75b5fa8e93
Contents?: true
Size: 632 Bytes
Versions: 2
Compression:
Stored size: 632 Bytes
Contents
require 'schematronium' require 'minitest' require 'minitest/pride' require 'minitest/autorun' class SchematroniumTest < MiniTest::Test def td(*path_segments) File.join(File.expand_path(File.dirname(__FILE__)), 'test_data', *path_segments) end def setup @stron = Schematronium.new(td('schematron', 'test.sch')) end def test_check_with_file results = @stron.check(File.open(td('xml', 'test.xml'))) results.remove_namespaces! assert_equal 1, results.xpath("//failed-assert").count, "Expects one failure" assert_equal 2, results.xpath("//successful-report").count, "Expects two reports" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
schematronium-0.1.0-java | test/test_schematronium.rb |
schematronium-0.0.0-java | test/test_schematronium.rb |