2021-05-24 01:24:22 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-05-20 04:39:53 +08:00
|
|
|
require 'simplecov-lcov'
|
|
|
|
|
|
|
|
SimpleCov::Formatter::LcovFormatter.config do |c|
|
|
|
|
c.output_directory = 'coverage'
|
|
|
|
c.lcov_file_name = 'lcov.info'
|
|
|
|
c.report_with_single_file = true
|
|
|
|
c.single_report_path = 'coverage/lcov.info'
|
|
|
|
end
|
2013-08-27 04:26:14 +08:00
|
|
|
|
2021-05-24 04:36:27 +08:00
|
|
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
|
|
|
[
|
|
|
|
SimpleCov::Formatter::HTMLFormatter,
|
|
|
|
SimpleCov::Formatter::LcovFormatter
|
|
|
|
]
|
|
|
|
)
|
2021-05-20 04:39:53 +08:00
|
|
|
|
2013-08-27 04:26:14 +08:00
|
|
|
SimpleCov.start do
|
2022-01-12 06:01:49 +08:00
|
|
|
enable_coverage :branch
|
2021-05-20 04:39:53 +08:00
|
|
|
add_filter ['/test/', '/samples/']
|
2013-08-27 04:26:14 +08:00
|
|
|
end
|