aboutsummaryrefslogtreecommitdiff
path: root/spec/lib/puppet_spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/puppet_spec')
-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