]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(#13595) initialize_everything_for_tests couples modules Puppet ver
authorEric Shamow <eric@puppetlabs.com>
Wed, 4 Apr 2012 03:26:36 +0000 (23:26 -0400)
committerEric Shamow <eric@puppetlabs.com>
Wed, 4 Apr 2012 03:26:36 +0000 (23:26 -0400)
Replace regex used in spec_helper.rb to disallow both Puppet 2.6 and any
2.7 prior to 13.

spec/spec_helper.rb

index 92fe1ad565057db2ecc75339b1e32846099c208c..9f806e3a0188be4090df01becbbf75911e641c7a 100644 (file)
@@ -73,7 +73,7 @@ RSpec.configure do |config|
 
     # We're using send because this is a private method to communicate it
     # should only be used for tests.  Puppet 2.6.x does not have the method.
-    Puppet.settings.send(:initialize_everything_for_tests) unless Puppet.version =~ /^2\.6/
+    Puppet.settings.send(:initialize_everything_for_tests) unless Puppet.version =~ /^(2\.6|2\.7\.[0-9][^3-9])/
 
 
     @logs = []
@@ -85,7 +85,7 @@ RSpec.configure do |config|
   config.after :each do
     # We're using send because this is a private method to communicate it
     # should only be used for tests.  Puppet 2.6.x does not have the method.
-    Puppet.settings.send(:clear_everything_for_tests) unless Puppet.version =~ /^2\.6/
+    Puppet.settings.send(:clear_everything_for_tests) unless Puppet.version =~ /^(2\.6|2\.7\.[0-9][^3-9])/
     Puppet::Node::Environment.clear
     Puppet::Util::Storage.clear
     Puppet::Util::ExecutionStub.reset if Puppet::Util.constants.include? "ExecutionStub"