summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAndrew Shafer <andrew@reductivelabs.com>2009-08-10 18:24:48 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-08-13 08:06:44 +1000
commitc129f2a15fdccc12baa3d929531221cbade7ff10 (patch)
tree4f7096c6f4c39feae8a61e564dd3340b4bc2cd44 /spec
parentb1ffffada99ce12b64bed7f93d4352317d1263b9 (diff)
downloadpuppet-c129f2a15fdccc12baa3d929531221cbade7ff10.tar.gz
puppet-c129f2a15fdccc12baa3d929531221cbade7ff10.tar.xz
puppet-c129f2a15fdccc12baa3d929531221cbade7ff10.zip
Fixes #2360 - Removed annoying log message
This change will effect all the properties implemented with list.rb (groups, roles, auths, profiles). The change will match [] values for should as insync when none exist. (so no more log message)
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/property/list.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/spec/unit/property/list.rb b/spec/unit/property/list.rb
index 854ab4874..84d14478b 100644
--- a/spec/unit/property/list.rb
+++ b/spec/unit/property/list.rb
@@ -118,14 +118,14 @@ describe list_class do
end
end
- describe "when calling insync?" do
+ describe "when calling insync?" do
it "should return true unless @should is defined and not nil" do
- @property.insync?("foo") == true
+ @property.must be_insync("foo")
end
it "should return true unless the passed in values is not nil" do
@property.should = "foo"
- @property.insync?(nil) == true
+ @property.must be_insync(nil)
end
it "should call prepare_is_for_comparison with value passed in and should" do
@@ -135,16 +135,22 @@ describe list_class do
@property.insync?("bar")
end
- it "should return true if prepared value == should value" do
+ it "should return true if 'is' value is array of comma delimited should values" do
@property.should = "bar,foo"
@property.expects(:inclusive?).returns(true)
- @property.insync?(["bar","foo"]).must == true
+ @property.must be_insync(["bar","foo"])
+ end
+
+ it "should return true if 'is' value is :absent and should value is empty string" do
+ @property.should = ""
+ @property.expects(:inclusive?).returns(true)
+ @property.must be_insync([])
end
it "should return false if prepared value != should value" do
@property.should = "bar,baz,foo"
@property.expects(:inclusive?).returns(true)
- @property.insync?(["bar","foo"]).must == false
+ @property.must_not be_insync(["bar","foo"])
end
end