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.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb
index 7d6d264405..4490aca9a9 100644
--- a/spec/unit/node/attribute_spec.rb
+++ b/spec/unit/node/attribute_spec.rb
@@ -1,7 +1,7 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: AJ Christensen (<aj@chef.io>)
-# Copyright:: Copyright 2008-2019, Chef Software Inc.
+# Copyright:: Copyright 2008-2020, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -1259,12 +1259,12 @@ describe Chef::Node::Attribute do
describe "frozen immutable strings" do
it "strings in hashes should be frozen" do
@attributes.default["foo"]["bar"]["baz"] = "fizz"
- expect { @attributes["foo"]["bar"]["baz"] << "buzz" }.to raise_error(RuntimeError, "can't modify frozen String")
+ expect { @attributes["foo"]["bar"]["baz"] << "buzz" }.to raise_error(FrozenError, /can't modify frozen String/)
end
it "strings in arrays should be frozen" do
@attributes.default["foo"]["bar"] = [ "fizz" ]
- expect { @attributes["foo"]["bar"][0] << "buzz" }.to raise_error(RuntimeError, "can't modify frozen String")
+ expect { @attributes["foo"]["bar"][0] << "buzz" }.to raise_error(FrozenError, /can't modify frozen String/)
end
end