From c8080b8303d952a50c946e33a3f331f481d93316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Thu, 19 Jun 2014 11:52:42 +0200 Subject: Auto enable strict_variables for unit tests when puppet > 3.5 --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a05654b..12bb0b7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,7 @@ RSpec.configure do |c| @old_env = {} ENV.each_key {|k| @old_env[k] = ENV[k]} - if ENV['STRICT_VARIABLES'] == 'yes' + if Gem::Version.new(`puppet --version`) >= Gem::Version.new('3.5') Puppet.settings[:strict_variables]=true end end -- cgit v1.2.3