diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-24 18:33:28 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-24 18:33:28 -0800 |
commit | 8cd125bf14c7637d2d28172c8a078cae66ac5c36 (patch) | |
tree | fdab0b31b8cf65f8e72fd9b79e4992a475a256cb | |
parent | 6c715e3c25d711b4ce13a003ce8370acef371659 (diff) | |
download | chef-8cd125bf14c7637d2d28172c8a078cae66ac5c36.tar.gz |
add a pending check for the object equality
-rw-r--r-- | spec/unit/node/cow_mash_spec.rb | 9 |
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 |