Merge pull request #129 from mcanevet/feature/enable_strict_variables

Auto enable strict_variables for unit tests when puppet > 3.5
This commit is contained in:
Ken Barber 2014-06-19 11:14:34 -07:00
commit 19935e65da
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ env:
- PUPPET_GEM_VERSION="~> 2.7"
- PUPPET_GEM_VERSION="~> 3.3"
- PUPPET_GEM_VERSION="> 3.3"
- PUPPET_GEM_VERSION="~> 3.5.0.rc3" STRICT_VARIABLES="yes"
- PUPPET_GEM_VERSION="~> 3.5.0"
global:
- PUBLISHER_LOGIN=puppetlabs
- secure: "FInoEwh3G4Auqp+OOdIc20lDLqrV6FHzWsM8ercHWjhDRD23VI49B1qqehWjaI8lKM3D5mTvdup23IVQBJo8M0rR/yfju1NhMYFTQ5bcJIrbQ3fn4n/zSaE8gLTOtHwzjSlqTJAYjxOAnp1VdMZngqpU/RYfSk68zJD34NqfovA="

View file

@ -14,7 +14,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