test/testcase_formatter_test.rb in minitest-junit-1.1.0 vs test/testcase_formatter_test.rb in minitest-junit-2.0.0
- old
+ new
@@ -15,21 +15,24 @@
class TestCaseFormatter < Minitest::Test
def test_all_tests_generate_testcase_tag
test = create_test_result
reporter = create_reporter
- assert_match test.name, reporter.format(test).target!
+ assert_match(
+ test.name,
+ reporter.format(test).attributes['name']
+ )
end
def test_skipped_tests_generates_skipped_tag
test = create_test_result
test.failures << create_error(Minitest::Skip)
reporter = create_reporter
reporter.record test
reporter.report
- assert_match(/<skipped message="[^<>]+"\/>\n<\/testcase>\n<\/testsuite>\n/, reporter.output)
+ assert_match(/<skipped message="[^<>]+"\><\/skipped>\n\s+<\/testcase>\n\s*<\/testsuite>\n/, reporter.output)
end
def test_failing_tests_creates_failure_tag
test = create_test_result
test.failures << create_error(Minitest::Assertion)