[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Daniel Pittman daniel at rimspace.net
Tue May 10 08:05:40 UTC 2011


The following commit has been merged in the experimental branch:
commit 7c9f1b803d86ead714ff90770e0ccc87ab29efbc
Author: Daniel Pittman <daniel at rimspace.net>
Date:   Wed Mar 2 19:08:24 2011 -0800

    (#6582) order RSpec global :before and :after hooks naturally.
    
    Specifically, reverse the order of the two in spec_helper so that they make
    more sense; the inverted order was confusing.  There are no functional
    changes, only code movement, in this patchset.
    
    Reviewed-By: Nick Lewis <nick at puppetlabs.com>

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 84ef3f2..feb8928 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -30,6 +30,23 @@ require 'monkey_patches/publicize_methods'
 RSpec.configure do |config|
   config.mock_with :mocha
 
+  config.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"
+
+    # Avoid opening ports to the outside world
+    Puppet.settings[:bindaddress] = "127.0.0.1"
+
+    @logs = []
+    Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs))
+  end
+
   config.after :each do
     Puppet.settings.clear
     Puppet::Node::Environment.clear
@@ -59,23 +76,6 @@ RSpec.configure do |config|
     @logs.clear
     Puppet::Util::Log.close_all
   end
-
-  config.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"
-
-    # Avoid opening ports to the outside world
-    Puppet.settings[:bindaddress] = "127.0.0.1"
-
-    @logs = []
-    Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs))
-  end
 end
 
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list