aboutsummaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorMelissa <melissa@puppet.com>2018-11-28 14:13:47 -0800
committerGitHub <noreply@github.com>2018-11-28 14:13:47 -0800
commit33045c209e0d692792d9059d0130617cf8eaf2ce (patch)
tree50a4e412de3839e45d691ce355992b001a03aaf7 /spec/lib
parentb51bd4961934fe0dc50f91955be02df6ee3711a2 (diff)
parent15696869bc4b62b47b5e6b873694635b2dc86c0d (diff)
downloadpuppet-sshkeys_core-33045c209e0d692792d9059d0130617cf8eaf2ce.tar.gz
puppet-sshkeys_core-33045c209e0d692792d9059d0130617cf8eaf2ce.tar.bz2
Merge pull request #12 from puppetlabs/modules8182
Expand test coverage
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/puppet_spec/compiler.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb
index 49a6534..4170b31 100644
--- a/spec/lib/puppet_spec/compiler.rb
+++ b/spec/lib/puppet_spec/compiler.rb
@@ -29,12 +29,16 @@ module PuppetSpec::Compiler
end
def apply_compiled_manifest(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new)
+ args = []
+ if Puppet.version.to_f < 5.0
+ args << 'apply'
+ 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