Skip to content

Commit 6e3ca6f

Browse files
authored
Adapt to SimpleCov deprecations (piotrmurach#366)
We adapt to some changes in the SimpleCov public API. We also exclude the `spec` subdirectory from line coverage calculations in order to avoid spurious coverage fluctuations.
1 parent e39fcca commit 6e3ca6f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

spec/coverage_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'simplecov'
22
require 'coveralls'
33

4-
SimpleCov.adapters.define 'github_api' do
4+
SimpleCov.profiles.define 'github_api' do
55
add_filter "/spec/"
66
add_filter "/features/"
77

spec/spec_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
require 'simplecov'
55
require 'coveralls'
66

7-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7+
SimpleCov.formatters = [
88
SimpleCov::Formatter::HTMLFormatter,
99
Coveralls::SimpleCov::Formatter
1010
]
1111
SimpleCov.start do
1212
command_name 'ci'
13+
14+
add_filter '/spec/'
1315
end
1416
end
1517

0 commit comments

Comments
 (0)