From 1c1ffc1f191081e4036faf05345d93899768a26d Mon Sep 17 00:00:00 2001 From: Andrew Zhou <0az@afzhou.com> Date: Wed, 16 Sep 2020 17:40:26 -0500 Subject: [PATCH] cask/exceptions: Actually print actual hash --- Library/Homebrew/cask/exceptions.rb | 2 +- Library/Homebrew/test/cask/verify_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/exceptions.rb b/Library/Homebrew/cask/exceptions.rb index 00113d2a86..e67831d383 100644 --- a/Library/Homebrew/cask/exceptions.rb +++ b/Library/Homebrew/cask/exceptions.rb @@ -184,7 +184,7 @@ module Cask def to_s <<~EOS Cask '#{token}' requires a checksum: - #{Formatter.identifier('sha256 "#{actual}"')} + #{Formatter.identifier("sha256 \"#{actual}\"")} EOS end end diff --git a/Library/Homebrew/test/cask/verify_spec.rb b/Library/Homebrew/test/cask/verify_spec.rb index f48f0c5d64..46ce8ad5de 100644 --- a/Library/Homebrew/test/cask/verify_spec.rb +++ b/Library/Homebrew/test/cask/verify_spec.rb @@ -31,7 +31,7 @@ module Cask let(:expected_sha256) { nil } it "raises an error" do - expect { verification }.to raise_error CaskSha256MissingError + expect { verification }.to raise_error(CaskSha256MissingError, /sha256 "#{computed_sha256}"/) end end @@ -39,7 +39,7 @@ module Cask let(:expected_sha256) { "" } it "raises an error" do - expect { verification }.to raise_error CaskSha256MissingError + expect { verification }.to raise_error(CaskSha256MissingError, /sha256 "#{computed_sha256}"/) end end -- GitLab