-
Notifications
You must be signed in to change notification settings - Fork 433
/
Copy pathspec_helper.rb
40 lines (33 loc) · 922 Bytes
/
spec_helper.rb
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
$: << File.expand_path("../../lib", __FILE__)
ENV["EDITOR"] = nil
ENV["BETTER_ERRORS"] = nil
require 'simplecov'
require 'simplecov-lcov'
# Fix incompatibility of simplecov-lcov with older versions of simplecov that are not expresses in its gemspec.
# https://github.com/fortissimo1997/simplecov-lcov/pull/25
if !SimpleCov.respond_to?(:branch_coverage)
module SimpleCov
def self.branch_coverage?
false
end
end
end
SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = 'coverage/lcov.info'
end
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
]
)
SimpleCov.start do
add_filter 'spec/'
end
require 'bundler/setup'
Bundler.require(:default)
require 'rspec-html-matchers'
RSpec.configure do |config|
config.include RSpecHtmlMatchers
end