diff options
author | Melissa <melissa@puppet.com> | 2018-11-28 14:10:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 14:10:39 -0800 |
commit | ba2c0d33b21d41c534e2f0dc01c680b3b917e423 (patch) | |
tree | 13a0e1cf9ca448c3b9481a19498bb23c2b320462 /spec/lib/puppet_spec | |
parent | b61f15615bceb3e1e9f960bf1c21546ac3d87d8d (diff) | |
parent | 4c8252342eef4bd443110e61a83365805c433dc7 (diff) | |
download | puppet-cron_core-ba2c0d33b21d41c534e2f0dc01c680b3b917e423.tar.gz puppet-cron_core-ba2c0d33b21d41c534e2f0dc01c680b3b917e423.tar.bz2 |
Merge pull request #6 from puppetlabs/modules8182
Expand test coverage
Diffstat (limited to 'spec/lib/puppet_spec')
-rw-r--r-- | spec/lib/puppet_spec/compiler.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb index 89c97a5..fb04a7b 100644 --- a/spec/lib/puppet_spec/compiler.rb +++ b/spec/lib/puppet_spec/compiler.rb @@ -29,12 +29,19 @@ module PuppetSpec::Compiler end def apply_compiled_manifest(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new) + args = [] + if Puppet.version.to_f < 5.0 + args << 'apply' + # rubocop:disable RSpec/AnyInstance + Puppet::Transaction::Persistence.any_instance.stubs(:save) + # rubocop:enable RSpec/AnyInstance + end catalog = compile_to_ral(manifest) if block_given? catalog.resources.each { |res| yield res } end transaction = Puppet::Transaction.new(catalog, - Puppet::Transaction::Report.new, + Puppet::Transaction::Report.new(*args), prioritizer) transaction.evaluate transaction.report.finalize_report |