summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-18 16:26:28 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-18 16:26:40 -0700
commit7471fc2d334e823b91851d09198cd5e5826bb283 (patch)
treeaac7339c4f70a805de26305d9f4c34cdf99e73f7
parentbf81c54548d21789e08752451b80cf98088b9211 (diff)
downloadchef-7471fc2d334e823b91851d09198cd5e5826bb283.tar.gz
Match on the specific error message
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/resource/timezone_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/resource/timezone_spec.rb b/spec/unit/resource/timezone_spec.rb
index 889d50207f..0d4ec21d30 100644
--- a/spec/unit/resource/timezone_spec.rb
+++ b/spec/unit/resource/timezone_spec.rb
@@ -73,7 +73,7 @@ systemd-timesyncd.service active: yes
context "without admin privs" do
it "returns the TZ" do
expect(resource).to receive(:shell_out!).and_return(shellout_systemsetup_fail)
- expect { resource.current_darwin_tz }.to raise_error(RuntimeError)
+ expect { resource.current_darwin_tz }.to raise_error(RuntimeError, "The timezone resource requires administrative privileges to run on macOS hosts!")
end
end
end