[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:13:26 UTC 2011


The following commit has been merged in the experimental branch:
commit 9496067f5644972def823cf8c3318aca137b86fe
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Mon Apr 11 22:25:58 2011 -0700

    maint: avoid making temporary dirs during testing.
    
    We used to create temporary directories to have some support files on disk
    during testing of faces; we don't really need that most of the time, and this
    updates a test to reflect that reality.
    
    Reviewed-By: Matt Robinson <matt at puppetlabs.com>

diff --git a/spec/lib/puppet/faces/basetest.rb b/spec/lib/puppet/faces/basetest.rb
new file mode 100644
index 0000000..d20c52b
--- /dev/null
+++ b/spec/lib/puppet/faces/basetest.rb
@@ -0,0 +1 @@
+Puppet::Faces.define(:basetest, '0.0.1')
diff --git a/spec/unit/application/faces_base_spec.rb b/spec/unit/application/faces_base_spec.rb
index b7a11ad..a6df55a 100755
--- a/spec/unit/application/faces_base_spec.rb
+++ b/spec/unit/application/faces_base_spec.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
+#!/usr/bin/env rspec
 
 require 'spec_helper'
 require 'puppet/application/faces_base'
@@ -9,13 +9,6 @@ end
 
 describe Puppet::Application::FacesBase do
   before :all do
-    @dir = Dir.mktmpdir
-    $LOAD_PATH.push(@dir)
-    FileUtils.mkdir_p(File.join @dir, 'puppet', 'faces')
-    File.open(File.join(@dir, 'puppet', 'faces', 'basetest.rb'), 'w') do |f|
-      f.puts "Puppet::Faces.define(:basetest, '0.0.1')"
-    end
-
     Puppet::Faces.define(:basetest, '0.0.1') do
       option("--[no-]boolean")
       option("--mandatory MANDATORY")
@@ -28,11 +21,6 @@ describe Puppet::Application::FacesBase do
     end
   end
 
-  after :all do
-    FileUtils.remove_entry_secure @dir
-    $LOAD_PATH.pop
-  end
-
   let :app do
     app = Puppet::Application::FacesBase::Basetest.new
     app.stubs(:exit)

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list