summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickaël Canévet <mickael.canevet@camptocamp.com>2014-06-06 13:36:39 +0200
committerMickaël Canévet <mickael.canevet@camptocamp.com>2014-06-06 13:36:39 +0200
commit34704e64f1680d3e02a3938ed58ddf72d7753190 (patch)
treec26383d28e1d7317129f3d062f92863e48d338cc
parent2791a33ce95a64a2c72dd124aa3c873a7a19219c (diff)
Auto enable strict_variables for unit tests when puppet > 3.5
-rw-r--r--.travis.yml2
-rw-r--r--spec/spec_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 3ced93c..6e83623 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,7 +14,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"
matrix:
fast_finish: true
exclude:
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 3a125ee..3fa3306 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -16,7 +16,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