-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
.simplecov
48 lines (35 loc) · 1.15 KB
/
.simplecov
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# frozen_string_literal: true
SimpleCov.start do
if ENV['SIMPLECOV_ROOT']
SimpleCov.root(ENV['SIMPLECOV_ROOT'])
filters.clear # This will remove the :root_filter and :bundler_filter that come via simplecov's defaults
# Because simplecov filters everything outside of the SimpleCov.root
# This should be added, cf.
# https://github.com/colszowka/simplecov#default-root-filter-and-coverage-for-things-outside-of-it
add_filter do |src|
src.filename !~ /^#{SimpleCov.root}/
end
end
add_group 'Source code', 'lib'
add_group 'Unit tests', 'spec'
add_group 'Behavior tests', 'features'
add_filter '/features/support/env.rb'
enable_coverage :branch
# do not track vendored files
add_filter '/vendor'
add_filter '/.vendor'
# exclude anything that is not in lib, spec or features directories
add_filter do |src|
src.filename !~ %r{^#{SimpleCov.root}/(lib|spec|features)}
end
track_files '**/*.rb'
end
if ENV['CODECOV'] == 'yes'
require 'simplecov-console'
require 'codecov'
SimpleCov.formatters = [
SimpleCov::Formatter::Console,
SimpleCov::Formatter::Codecov,
]
end
# vim: filetype=ruby