diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-03-29 23:21:09 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-03-29 23:21:09 -0700 |
commit | b9a33851d22d1530e018c74fc802fcb99a930268 (patch) | |
tree | d89fbe46a210be4e590bc8a3eab709a16377de64 /spec | |
parent | 07700216bb916a95d376810f85551df9a3580334 (diff) | |
parent | d32115979d2a6b1670fe2a59bd7aea9f6d2507d1 (diff) |
Merge branch '2.4.x'
* 2.4.x:
(#13439) Fix MRI 1.9 issue with spec_helper
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9c69b53..0f3248b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -70,11 +70,8 @@ RSpec.configure do |config| Signal.stubs(:trap) # We're using send because this is a private method to communicate it - # should only be used for tests. We're testing if it's defined to work - # with Puppet 2.6.x which does not have the method. - if Puppet.settings.private_methods.include? "initialize_everything_for_tests" - Puppet.settings.send(:initialize_everything_for_tests) - end + # 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/ @logs = [] @@ -85,11 +82,8 @@ 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. We're testing if it's defined to work - # with Puppet 2.6.x which does not have the method at all. - if Puppet.settings.private_methods.include? "clear_everything_for_tests" - Puppet.settings.send(:clear_everything_for_tests) - end + # 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::Node::Environment.clear Puppet::Util::Storage.clear Puppet::Util::ExecutionStub.reset if Puppet::Util.constants.include? "ExecutionStub" |