From 5b8568defa9351169b051cea7638800ad397c8bd Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Mon, 5 Aug 2024 09:17:23 -0700 Subject: [PATCH] system_command_spec: specify exception Signed-off-by: Patrick Linnane --- Library/Homebrew/test/system_command_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/test/system_command_spec.rb b/Library/Homebrew/test/system_command_spec.rb index 210dd142c8..445dd30184 100644 --- a/Library/Homebrew/test/system_command_spec.rb +++ b/Library/Homebrew/test/system_command_spec.rb @@ -324,7 +324,7 @@ RSpec.describe SystemCommand do args: %w[--user username:hunter2], verbose: true, secrets: %w[hunter2] - end.to raise_error.with_message(redacted_msg).and output(redacted_msg).to_stderr + end.to raise_error(ErrorDuringExecution, redacted_msg).and output(redacted_msg).to_stderr end it "does not leak the secrets set by environment" do @@ -334,7 +334,7 @@ RSpec.describe SystemCommand do described_class.run! "curl", args: %w[--user username:hunter2], verbose: true - end.to raise_error.with_message(redacted_msg).and output(redacted_msg).to_stderr + end.to raise_error(ErrorDuringExecution, redacted_msg).and output(redacted_msg).to_stderr end end