From 29f09e2181a56ec801b39e56bd28119709495dd9 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Wed, 15 Apr 2015 16:46:09 -0700 Subject: spec_helper: set parser config if requested --- spec/lib/puppet_spec/compiler.rb | 1 + spec/spec_helper.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb index 2f0ae4d..1f322ca 100755 --- a/spec/lib/puppet_spec/compiler.rb +++ b/spec/lib/puppet_spec/compiler.rb @@ -2,6 +2,7 @@ module PuppetSpec::Compiler def compile_to_catalog(string, node = Puppet::Node.new('foonode')) Puppet[:code] = string + Puppet[:parser] = 'future' if ENV['FUTURE_PARSER'] == 'yes' Puppet::Parser::Compiler.compile(node) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b490ca3..13014ab 100755 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,5 +30,7 @@ RSpec.configure do |config| Facter::Util::Loader.any_instance.stubs(:load_all) Facter.clear Facter.clear_messages + + Puppet[:parser] = 'future' if ENV['FUTURE_PARSER'] == 'yes' end end -- cgit v1.2.3