aboutsummaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ea74a52..88bca59 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,10 +1,9 @@
-require 'puppetlabs_spec_helper/module_spec_helper'
-require 'rspec-puppet-facts'
-include RspecPuppetFacts
-
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
+require 'puppetlabs_spec_helper/module_spec_helper'
+require 'rspec-puppet-facts'
+include RspecPuppetFacts
if Dir.exist?(File.expand_path('../../lib', __FILE__))
require 'coveralls'
@@ -23,13 +22,13 @@ if Dir.exist?(File.expand_path('../../lib', __FILE__))
end
RSpec.configure do |c|
- default_facts = {
- puppetversion: Puppet.version,
- facterversion: Facter.version
- }
+ default_facts = {}
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__))
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__))
c.default_facts = default_facts
-end
-# vim: syntax=ruby
+ # Coverage generation
+ c.after(:suite) do
+ RSpec::Puppet::Coverage.report!
+ end
+end