diff options
author | Fabien COMBERNOUS <Dan33l@users.noreply.github.com> | 2019-01-24 23:18:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-24 23:18:58 +0100 |
commit | d5d12d754f9619a2260ecad223b5a5d4fa8fdd1b (patch) | |
tree | 874142bcc565105729bfcfd82d856604c1a9868b /spec/spec_helper.rb | |
parent | 3612961ef7599afe37e224271629eb721965536c (diff) | |
parent | de09602e9ec297aab695714aff39d740c94606b0 (diff) | |
download | puppet-ferm-d5d12d754f9619a2260ecad223b5a5d4fa8fdd1b.tar.gz puppet-ferm-d5d12d754f9619a2260ecad223b5a5d4fa8fdd1b.tar.bz2 |
Merge pull request #36 from voxpupuli/modulesync
modulesync 2.5.1 and drop Puppet4
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 88bca59..2f2279d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,6 +5,15 @@ require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts' include RspecPuppetFacts +if File.exist?(File.join(__dir__, 'default_module_facts.yml')) + facts = YAML.load(File.read(File.join(__dir__, 'default_module_facts.yml'))) + if facts + facts.each do |name, value| + add_custom_fact name.to_sym, value + end + end +end + if Dir.exist?(File.expand_path('../../lib', __FILE__)) require 'coveralls' require 'simplecov' @@ -22,11 +31,6 @@ if Dir.exist?(File.expand_path('../../lib', __FILE__)) end RSpec.configure do |c| - 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 - # Coverage generation c.after(:suite) do RSpec::Puppet::Coverage.report! |