diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-03 15:42:55 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-03 15:42:55 -0800 |
commit | 390e90bffa8d7766d3b06a59693dd29a1700e010 (patch) | |
tree | 811212b842a6766c9471eafc46c28f850851b5c4 | |
parent | 18e1c343fe000cc6e8b21e19a1c11dfddb53a2c5 (diff) | |
download | chef-lcg/attributes-v1.99.tar.gz |
uncomment some pending/skipped testslcg/attributes-v1.99
-rw-r--r-- | spec/unit/node/attribute_trait/decorator_hash_spec.rb | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/spec/unit/node/attribute_trait/decorator_hash_spec.rb b/spec/unit/node/attribute_trait/decorator_hash_spec.rb index bde09dbc33..c4b6dfb48b 100644 --- a/spec/unit/node/attribute_trait/decorator_hash_spec.rb +++ b/spec/unit/node/attribute_trait/decorator_hash_spec.rb @@ -99,14 +99,15 @@ describe Chef::Node::AttributeTrait::Decorator do ) end -# it "#initialize_copy bad" do -# h = hash_bracket(Class.new(Hash) { -# def initialize_copy(h) -# super(Object.new) -# end -# }.new) -# expect { h.dup }.to raise_error(TypeError) -# end + it "#initialize_copy bad" do + pending "needs more investigation" + h = hash_bracket(Class.new(Hash) { + def initialize_copy(h) + super(Object.new) + end + }.new) + expect { h.dup }.to raise_error(TypeError) + end it "#initialize_copy clear" do h = hash_bracket(1 => 2) @@ -122,15 +123,15 @@ describe Chef::Node::AttributeTrait::Decorator do expect(2).to eql(h[1]) end -# it "#dup will rehash" do -# skip "we deep-dup" -# set1 = hash_bracket() -# set2 = hash_bracket(set1 => true) -# -# set1[set1] = true -# -# expect(set2).to eql(set2.dup) -# end + it "#dup will rehash" do + skip "we deep-dup and so wind up in an infinite loop" + set1 = hash_bracket() + set2 = hash_bracket(set1 => true) + + set1[set1] = true + + expect(set2).to eql(set2.dup) + end it "test_s_AREF" do h = hash_bracket("a" => 100, "b" => 200) |