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