From 675bcead2be7a5532715cc4bcad33217b517e725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Tue, 3 Feb 2015 14:20:09 +0100 Subject: Speed up unit tests --- spec/spec_helper.rb | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'spec/spec_helper.rb') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1148f7f..86cc740 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,24 +7,11 @@ RSpec.configure do |c| c.include PuppetlabsSpec::Files c.before :each do - # Ensure that we don't accidentally cache facts and environment - # between test cases. - Facter::Util::Loader.any_instance.stubs(:load_all) - Facter.clear - Facter.clear_messages - # Store any environment variables away to be restored later @old_env = {} ENV.each_key {|k| @old_env[k] = ENV[k]} - if Gem::Version.new(`puppet --version`) >= Gem::Version.new('3.5') - Puppet.settings[:strict_variables]=true - end - - if ENV['FUTURE_PARSER'] == 'yes' - c.parser='future' - end - + Puppet.settings[:strict_variables]=true if Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('3.5') Puppet.features.stubs(:root?).returns(true) end -- cgit v1.2.3