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

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:16:00 UTC 2011


The following commit has been merged in the experimental branch:
commit d80500f42367fa30a00dc12ef4b32b55b350b1ca
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Fri Apr 15 15:34:06 2011 -0700

    maint: speed up testing output of the help face.
    
    We were generating the help output multiple times and testing it for multiple
    properties; now we generate it once and test it multiple times.  This makes
    for less clear error reporting, but saving dozens of calls at ~ 1/3rd a second
    each is worth it.
    
    Paired-With: Max Martin <max at puppetlabs.com>

diff --git a/spec/unit/face/help_spec.rb b/spec/unit/face/help_spec.rb
index e67f29e..b5205af 100755
--- a/spec/unit/face/help_spec.rb
+++ b/spec/unit/face/help_spec.rb
@@ -55,19 +55,23 @@ describe Puppet::Face[:help, '0.0.1'] do
       end
     end
 
-    Puppet::Face.faces.each do |name|
-      face = Puppet::Face[name, :current]
-      summary = face.summary
+    it "should list all faces" do
+      Puppet::Face.faces.each do |name|
+        face = Puppet::Face[name, :current]
+        summary = face.summary
 
-      it { should =~ %r{ #{name} } }
-      it { should =~ %r{ #{name} +#{summary}} } if summary
+        subject.should =~ %r{ #{name} }
+        summary and subject.should =~ %r{ #{name} +#{summary}}
+      end
     end
 
-    Puppet::Face[:help, :current].legacy_applications.each do |appname|
-      it { should =~ %r{ #{appname} } }
+    it "should list all legacy applications" do
+      Puppet::Face[:help, :current].legacy_applications.each do |appname|
+        subject.should =~ %r{ #{appname} }
 
-      summary = Puppet::Face[:help, :current].horribly_extract_summary_from(appname)
-      summary and it { should =~ %r{ #{summary}\b} }
+        summary = Puppet::Face[:help, :current].horribly_extract_summary_from(appname)
+        summary and subject.should =~ %r{ #{summary}\b}
+      end
     end
   end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list