spec/spec_helper.rb in beaker-puppet-1.21.0 vs spec/spec_helper.rb in beaker-puppet-1.22.0
- old
+ new
@@ -1,6 +1,29 @@
-require 'simplecov'
+begin
+ require 'simplecov'
+ require 'simplecov-console'
+ require 'codecov'
+rescue LoadError
+else
+ SimpleCov.start do
+ track_files 'lib/**/*.rb'
+
+ add_filter '/spec'
+
+ enable_coverage :branch
+
+ # do not track vendored files
+ add_filter '/vendor'
+ add_filter '/.vendor'
+ end
+
+ SimpleCov.formatters = [
+ SimpleCov::Formatter::Console,
+ SimpleCov::Formatter::Codecov,
+ ]
+end
+
# require 'pp' statement needed before fakefs, otherwise they can collide. Ref:
# https://github.com/fakefs/fakefs#fakefs-----typeerror-superclass-mismatch-for-class-file
require 'pp'
require 'fakefs/spec_helpers'
require 'beaker'
@@ -18,6 +41,6 @@
RSpec.configure do |config|
config.include FakeFS::SpecHelpers
config.include TestFileHelpers
config.include HostHelpers
-end
\ No newline at end of file
+end