summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2012-03-29 23:48:37 -0700
committerJeff McCune <jeff@puppetlabs.com>2012-03-29 23:48:37 -0700
commit0b39d32f9b2fbfab83081db78600a27d3fa4a274 (patch)
tree10cb09ede397b1659ec0e95d35195433c36ee0a6 /spec
parent44394513e9b0e23697eaefa4bc7f8145a0c555f5 (diff)
(#13439) Make spec_helper work with Puppet master
Without this patch the spec_helper does not invoke Puppet.settings.send(:initialize_everything_for_tests) This is necessary to set default configuration settings, otherwise exceptions are raised when testing against the Puppet master branch.
Diffstat (limited to 'spec')
-rw-r--r--spec/spec_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 10afd38..1474db1 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -11,9 +11,11 @@ RSpec.configure do |c|
Dir.mkdir(manifestdir)
FileUtils.touch(File.join(manifestdir, "site.pp"))
Puppet[:confdir] = @puppetdir
+ Puppet.settings.send(:initialize_everything_for_tests) unless Puppet.version =~ /^2\.6/
end
c.after :each do
+ Puppet.settings.send(:clear_everything_for_tests) unless Puppet.version =~ /^2\.6/
FileUtils.remove_entry_secure(@puppetdir)
end