[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Markus Roberts Markus at reality.com
Wed Jul 14 10:36:25 UTC 2010


The following commit has been merged in the upstream branch:
commit e579aab5529f080d88aed35656b66d80a2065a64
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Thu Jul 1 15:19:32 2010 -0700

    maint: spec_helper should reset settings directories on *every* test
    
    Previously, spec_helper's attempts to set :confdir, and :vardir to
    /dev/null were getting thwarted by the Settings.clear in after_all

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e1b65e6..ffc3e9b 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.

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list