]> gitweb.fluxo.info Git - puppet-dhcp.git/commitdiff
Fix strict_variables activation with rspec-puppet 2.2
authorMickaël Canévet <mickael.canevet@camptocamp.com>
Fri, 26 Jun 2015 09:03:02 +0000 (11:03 +0200)
committerMickaël Canévet <mickael.canevet@camptocamp.com>
Fri, 26 Jun 2015 09:03:02 +0000 (11:03 +0200)
spec/spec_helper.rb

index c5b11ae0f5500688c6b7d264330f8c7c6d61ee3c..94d30d5ce06d0e4d2be10bc4361bc4fd602bb7e4 100644 (file)
@@ -11,7 +11,7 @@ RSpec.configure do |c|
     @old_env = {}
     ENV.each_key {|k| @old_env[k] = ENV[k]}
 
-    Puppet.settings[:strict_variables]=true if Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('3.5')
+    c.strict_variables = Gem::Version.new(Puppet.version) >= Gem::Version.new('3.5')
     Puppet.features.stubs(:root?).returns(true)
   end