summaryrefslogtreecommitdiff
path: root/spec/unit/node
diff options
context:
space:
mode:
authorKartik Null Cating-Subramanian <ksubramanian@chef.io>2016-04-21 13:26:30 -0400
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2016-04-25 12:04:09 -0400
commit2034305917a76d4c203e457a9ebf61d28819ccbd (patch)
treed43562f4902ab0db80b4178ffefbdff825f4d66f /spec/unit/node
parentd5039e38977b9da431fcb52670576561d772aa27 (diff)
downloadchef-2034305917a76d4c203e457a9ebf61d28819ccbd.tar.gz
Too much log output and unnecessary warnings! Suppress that shit.
Diffstat (limited to 'spec/unit/node')
-rw-r--r--spec/unit/node/attribute_spec.rb2
-rw-r--r--spec/unit/node/immutable_collections_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb
index f28c2598e3..57ad3c0c25 100644
--- a/spec/unit/node/attribute_spec.rb
+++ b/spec/unit/node/attribute_spec.rb
@@ -408,7 +408,7 @@ describe Chef::Node::Attribute do
end
it "should die if you try and do nested attributes that do not exist without read vivification" do
- expect { @attributes["foo"]["bar"] = :baz }.to raise_error
+ expect { @attributes["foo"]["bar"] = :baz }.to raise_error(NoMethodError)
end
it "should let you set attributes manually without vivification" do
diff --git a/spec/unit/node/immutable_collections_spec.rb b/spec/unit/node/immutable_collections_spec.rb
index 170e6d927a..f57ed459cd 100644
--- a/spec/unit/node/immutable_collections_spec.rb
+++ b/spec/unit/node/immutable_collections_spec.rb
@@ -97,7 +97,7 @@ describe Chef::Node::ImmutableMash do
:shift,
].each do |mutator|
it "doesn't allow mutation via `#{mutator}'" do
- expect { @immutable_mash.send(mutator) }.to raise_error
+ expect { @immutable_mash.send(mutator) }.to raise_error(Chef::Exceptions::ImmutableAttributeModification)
end
end
@@ -154,7 +154,7 @@ describe Chef::Node::ImmutableArray do
:unshift,
].each do |mutator|
it "does not allow mutation via `#{mutator}" do
- expect { @immutable_array.send(mutator) }.to raise_error
+ expect { @immutable_array.send(mutator) }.to raise_error(Chef::Exceptions::ImmutableAttributeModification)
end
end