summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-24 18:33:28 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-24 18:33:28 -0800
commit8cd125bf14c7637d2d28172c8a078cae66ac5c36 (patch)
treefdab0b31b8cf65f8e72fd9b79e4992a475a256cb
parent6c715e3c25d711b4ce13a003ce8370acef371659 (diff)
downloadchef-8cd125bf14c7637d2d28172c8a078cae66ac5c36.tar.gz
add a pending check for the object equality
-rw-r--r--spec/unit/node/cow_mash_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/unit/node/cow_mash_spec.rb b/spec/unit/node/cow_mash_spec.rb
index 5a28d820ef..cda31089fa 100644
--- a/spec/unit/node/cow_mash_spec.rb
+++ b/spec/unit/node/cow_mash_spec.rb
@@ -4,12 +4,19 @@ require "chef/node/cow_mash"
describe Chef::Node::COWMash do
context "#keep_if" do
- it "works" do
+ it "behaves correctly" do
hash = { "foo" => true, "bar" => false }
cow = Chef::Node::COWMash.new(wrapped_object: hash)
expect(cow.keep_if { |k, v| v }).to eql({ "foo" => true })
expect(hash).to eql({ "foo" => true, "bar" => false })
expect(cow).to eql({ "foo" => true })
end
+
+ it "returns the object it mutates" do
+ pending "not yet fixed"
+ hash = { "foo" => true, "bar" => false }
+ cow = Chef::Node::COWMash.new(wrapped_object: hash)
+ expect(cow.keep_if { |k, v| v }).to equal(cow)
+ end
end
end