diff options
author | Steffen Zieger <me@saz.sh> | 2014-06-22 15:43:36 +0200 |
---|---|---|
committer | Steffen Zieger <me@saz.sh> | 2014-06-22 15:43:36 +0200 |
commit | e4c2a0156abd6edecfdf1504da329bc3c8c41d01 (patch) | |
tree | 946c6c14c39a39f9209bbff830d2af3a3a67726d | |
parent | 0e9d420d5752fb8cc76e141e572eeb0c1d9cdd5e (diff) | |
parent | c8080b8303d952a50c946e33a3f331f481d93316 (diff) |
Merge pull request #83 from mcanevet/feature/enable_strict_variables
Auto enable strict_variables for unit tests when puppet > 3.5
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 7480714..bf7edeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ env: - PUPPET_GEM_VERSION="~> 3.2.0" - PUPPET_GEM_VERSION="~> 3.3.0" - PUPPET_GEM_VERSION="~> 3.4.0" - - PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes" + - PUPPET_GEM_VERSION="~> 3.5.0" global: - PUBLISHER_LOGIN=saz - secure: |- 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 |