]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
spec_helper: set parser config if requested
authorDavid Schmitt <david.schmitt@puppetlabs.com>
Wed, 15 Apr 2015 23:46:09 +0000 (16:46 -0700)
committerDavid Schmitt <david.schmitt@puppetlabs.com>
Tue, 5 May 2015 12:27:46 +0000 (13:27 +0100)
spec/lib/puppet_spec/compiler.rb
spec/spec_helper.rb

index 2f0ae4d79743b8050cb56ca60bcbb5731ba32425..1f322ca63f010ae64d6d253faa58bc54b159fb93 100755 (executable)
@@ -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
 
index b490ca3c9e326b4c31518d41c9a333656a34d3a0..13014ab863695641664b756ad4d5339aa02cbc94 100755 (executable)
@@ -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