Please review pull request #687: (maint) Add provider confine :exists => nil spec opened by (jeffweiss)
Description:
Add a test for the provider confine exists when the value is nil.
Related tests are failing when confine :exists => nil, but the confine
:exists => nil case had not explicitly been tested.
- Opened: Thu Apr 19 08:03:53 UTC 2012
- Based on: puppetlabs:master (b7c4fe3ef4ccd9b514d2c48167fe314558eecd31)
- Requested merge: jeffweiss:maint/master/add_provider_confine_exists_nil_spec (c6c2e8af030e850fe356a2e8166289cf868b9d22)
Diff follows:
diff --git a/spec/unit/provider/confine/exists_spec.rb b/spec/unit/provider/confine/exists_spec.rb
index 1e2d7f8..30b8793 100755
--- a/spec/unit/provider/confine/exists_spec.rb
+++ b/spec/unit/provider/confine/exists_spec.rb
@@ -12,6 +12,13 @@
it "should be named :exists" do
Puppet::Provider::Confine::Exists.name.should == :exists
end
+
+ it "should not pass if exists is nil" do
+ confine = Puppet::Provider::Confine::Exists.new(nil)
+ confine.label = ":exists => nil"
+ confine.expects(:pass?).with(nil)
+ confine.should_not be_valid
+ end
it "should use the 'pass?' method to test validity" do
@confine.expects(:pass?).with("/my/file")
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
