cask/exceptions: Actually print actual hash

This commit is contained in:
Andrew Zhou 2020-09-16 17:40:26 -05:00
parent 871abe8b9b
commit 1c1ffc1f19
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