diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-03-29 23:48:37 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-03-29 23:48:37 -0700 |
commit | 0b39d32f9b2fbfab83081db78600a27d3fa4a274 (patch) | |
tree | 10cb09ede397b1659ec0e95d35195433c36ee0a6 | |
parent | 44394513e9b0e23697eaefa4bc7f8145a0c555f5 (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.
-rw-r--r-- | Rakefile | 1 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -1,4 +1,5 @@ require 'rake' +require 'rubygems' require 'rspec/core/rake_task' task :default do 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 |