From 4ba88fb82cf054f48b6c5bf04ed42c86d6523cbc Mon Sep 17 00:00:00 2001 From: Ben Dalling Date: Mon, 26 Dec 2016 07:44:11 +0000 Subject: [PATCH] Integrated with Coveralls (#7). --- spec/spec_helper.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fd6d314..9b1f149 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,16 +1,17 @@ -require 'coveralls' require 'rspec-puppet' require 'rspec-puppet-utils' require 'puppetlabs_spec_helper/module_spec_helper' require 'simplecov' +require 'coveralls' unless ENV['TRAVIS'] == 'true' +Coveralls.wear! unless ENV['TRAVIS'] == 'true' fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) RSpec.configure do |c| c.module_path = File.join(fixture_path, 'modules') c.manifest_dir = File.join(fixture_path, 'manifests') c.environmentpath = File.join(Dir.pwd, 'spec') + c.after(:suite) do + exit(1) if RSpec::Puppet::Coverage.report!(100) + end end - -Coveralls.wear! -at_exit { RSpec::Puppet::Coverage.report! }