summaryrefslogtreecommitdiff
path: root/spec/unit/node/attribute_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/node/attribute_spec.rb')
-rw-r--r--spec/unit/node/attribute_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb
index ef3fc60cc6..bab2e33aa9 100644
--- a/spec/unit/node/attribute_spec.rb
+++ b/spec/unit/node/attribute_spec.rb
@@ -488,6 +488,13 @@ describe Chef::Node::Attribute do
end
end
+ describe "dup" do
+ it "array can be duped even if some elements can't" do
+ @attributes.default[:foo] = %w[foo bar baz] + Array(1..3) + [nil, true, false, [ "el", 0, nil ] ]
+ @attributes.default[:foo].dup
+ end
+ end
+
describe "has_key?" do
it "should return true if an attribute exists" do
@attributes.has_key?("music").should == true