diff options
-rw-r--r-- | spec/spec_helper.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e1b65e6de..ffc3e9b5c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -66,12 +66,18 @@ Spec::Runner.configure do |config| $tmpfiles.clear end end -end -# Set the confdir and vardir to gibberish so that tests -# have to be correctly mocked. -Puppet[:confdir] = "/dev/null" -Puppet[:vardir] = "/dev/null" + config.prepend_before :each do + # these globals are set by Application + $puppet_application_mode = nil + $puppet_application_name = nil + + # Set the confdir and vardir to gibberish so that tests + # have to be correctly mocked. + Puppet[:confdir] = "/dev/null" + Puppet[:vardir] = "/dev/null" + end +end # We need this because the RAL uses 'should' as a method. This # allows us the same behaviour but with a different method name. |