system_command_spec: specify exception

Signed-off-by: Patrick Linnane <patrick@linnane.io>
This commit is contained in:
Patrick Linnane 2024-08-05 09:17:23 -07:00
parent 2a9f8aa916
commit 5b8568defa
No known key found for this signature in database

View File

@ -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