From 47bc3423f6251a2a1c28cc03ebc3fab2cb31c7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Tue, 8 Apr 2014 16:38:31 +0200 Subject: [PATCH] Add strict_variables support in unit tests --- .travis.yml | 1 + spec/spec_helper.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index fb14e76..762b997 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ env: - PUPPET_GEM_VERSION="~> 2.7.0" - PUPPET_GEM_VERSION="~> 3.2.0" - PUPPET_GEM_VERSION="~> 3.4.0" + - PUPPET_GEM_VERSION="~> 3.5.0.rc3" STRICT_VARIABLES="yes" matrix: fast_finish: true exclude: diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b4c44aa..1cc1fce 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,6 +16,10 @@ RSpec.configure do |c| # Store any environment variables away to be restored later @old_env = {} ENV.each_key {|k| @old_env[k] = ENV[k]} + + if ENV['STRICT_VARIABLES'] == 'yes' + Puppet.settings[:strict_variables]=true + end end c.after :each do