Merge pull request #8746 from 0az/fix-sha256-error

cask/exceptions: Actually print actual hash
This commit is contained in:
Markus Reiter 2020-09-17 02:08:57 +02:00 committed by GitHub
commit 9dd5d42477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

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

View File

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