diff --git a/lib/voxpupuli/test/spec_helper.rb b/lib/voxpupuli/test/spec_helper.rb index 1a88238..6022b13 100644 --- a/lib/voxpupuli/test/spec_helper.rb +++ b/lib/voxpupuli/test/spec_helper.rb @@ -11,6 +11,12 @@ require 'puppetlabs_spec_helper/module_spec_helper' RSpec.configure do |config| + # This completely disables Facter and uses a stubbed implementation. This is + # fine since we use use rspec-puppet-facts to set all facts. It gives + # complete isolation from the host system. It only works with Puppet 6.25+ + # and 7.12+ and requires rspec-puppet 2.11.0+. + config.facter_implementation = 'rspec' + config.after(:suite) do RSpec::Puppet::Coverage.report! end diff --git a/voxpupuli-test.gemspec b/voxpupuli-test.gemspec index 7dc7074..aa72f4e 100644 --- a/voxpupuli-test.gemspec +++ b/voxpupuli-test.gemspec @@ -22,6 +22,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'parallel_tests' # 4.0.0 provides rubocop annotations in GitHub Actions s.add_runtime_dependency 'puppetlabs_spec_helper', '>= 4.0.0' + s.add_runtime_dependency 'rspec-puppet', '>= 2.11.0' s.add_runtime_dependency 'rspec-puppet-facts', '>= 2.0.1', '< 3' s.add_runtime_dependency 'rspec-puppet-utils', '>= 1.9.5'