diff options
author | Tim Meusel <tim@bastelfreak.de> | 2019-12-09 10:52:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 10:52:14 +0100 |
commit | 5963fbe43946825177a52bf875405cb8199df6e3 (patch) | |
tree | 0c3596678b81e3241bcf8878004aed3e5160a3ce /spec | |
parent | dd8ac301ea28927fd0494d9028ff059a836080a7 (diff) | |
parent | d4106af027780bf3573b0ff8956caf3aa9f0e9bc (diff) | |
download | puppet-ferm-5963fbe43946825177a52bf875405cb8199df6e3.tar.gz puppet-ferm-5963fbe43946825177a52bf875405cb8199df6e3.tar.bz2 |
Merge pull request #91 from voxpupuli/modulesync
modulesync 2.9.0
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 96f14d5..93f417a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -42,6 +42,18 @@ if Dir.exist?(File.expand_path('../../lib', __FILE__)) end RSpec.configure do |c| + # getting the correct facter version is tricky. We use facterdb as a source to mock facts + # see https://github.com/camptocamp/facterdb + # people might provide a specific facter version. In that case we use it. + # Otherwise we need to match the correct facter version to the used puppet version. + # as of 2019-10-31, puppet 5 ships facter 3.11 and puppet 6 ships facter 3.14 + # https://puppet.com/docs/puppet/5.5/about_agent.html + c.default_facter_version = if ENV['FACTERDB_FACTS_VERSION'] + ENV['FACTERDB_FACTS_VERSION'] + else + Gem::Dependency.new('', ENV['PUPPET_VERSION']).match?('', '5') ? '3.11.0' : '3.14.0' + end + # Coverage generation c.after(:suite) do RSpec::Puppet::Coverage.report! |