diff options
author | Mickaël Canévet <mickael.canevet@camptocamp.com> | 2015-02-03 14:14:25 +0100 |
---|---|---|
committer | Mickaël Canévet <mickael.canevet@camptocamp.com> | 2015-02-03 14:14:25 +0100 |
commit | c5c5af257406d0bd52fa3a097b8edc8ef20857d1 (patch) | |
tree | 552a9013f15dbdcca7862db9a7775a748a8da32d /spec | |
parent | 99a516b4ebf4dbdc08b1ffaae4b179e3d013f146 (diff) | |
download | puppet-dhcp-c5c5af257406d0bd52fa3a097b8edc8ef20857d1.tar.gz puppet-dhcp-c5c5af257406d0bd52fa3a097b8edc8ef20857d1.tar.bz2 |
Speed up unit tests
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 15 |
1 files changed, 1 insertions, 14 deletions
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 |