Skip to content

Commit d26877e

Browse files
committed
fix: resolve SimpleCov XML parsing error with MultiFormatter
- Configure SimpleCov to use both HTMLFormatter and CoberturaFormatter - Prevents REXML::ParseException during coverage report generation - Ensures robust coverage reporting for CI/CD pipelines
1 parent cdc1226 commit d26877e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spec/spec_helper.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# frozen_string_literal: true
22

33
require "simplecov"
4+
require "simplecov-cobertura"
5+
46
SimpleCov.start do
57
add_filter "/spec/"
8+
9+
# Use multiple formatters to ensure coverage data is available
10+
formatter SimpleCov::Formatter::MultiFormatter.new([
11+
SimpleCov::Formatter::HTMLFormatter,
12+
SimpleCov::Formatter::CoberturaFormatter
13+
])
614
end
715

8-
require "simplecov-cobertura"
9-
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
10-
1116
require "nylas"
1217
require "support/nylas_helpers"
1318

0 commit comments

Comments
 (0)