[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:17:25 UTC 2011
The following commit has been merged in the experimental branch:
commit 677752d44e180d7293fbae6594f51fe7d41fb3fc
Author: Daniel Pittman <daniel at puppetlabs.com>
Date: Wed Apr 20 16:26:02 2011 -0700
maint: handle face clear/reset sanely in the interface spec.
We used to flush the loaded face cache, but not the list of 'require' things,
which meant that these tests couldn't work with anything outside their own
setup, which is actually pretty undesirable.
Instead, port the code from the face_collection spec that handles this in a
way that makes me less inclined to weep, and which lets the surrounding code
work as designed.
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index b4fef03..5eb7922 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -5,16 +5,17 @@ require 'puppet/interface'
describe Puppet::Interface do
subject { Puppet::Interface }
- before :all do
- @faces = Puppet::Interface::FaceCollection.instance_variable_get("@faces").dup
- end
-
before :each do
+ @faces = Puppet::Interface::FaceCollection.
+ instance_variable_get("@faces").dup
+ @dq = $".dup
+ $".delete_if do |path| path =~ %r{/face/.*\.rb$} end
Puppet::Interface::FaceCollection.instance_variable_get("@faces").clear
end
- after :all do
+ after :each do
Puppet::Interface::FaceCollection.instance_variable_set("@faces", @faces)
+ $".clear ; @dq.each do |item| $" << item end
end
describe "#[]" do
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list