cache: add test for casks

This commit is contained in:
William Ma 2020-06-22 11:24:49 -04:00
parent 0495281325
commit cf6ff4d84c

View File

@ -13,4 +13,18 @@ describe "brew --cache", :integration_test do
.and not_to_output.to_stderr
.and be_a_success
end
it "prints the cache files for a given Cask" do
expect { brew "--cache", cask_path("local-caffeine") }
.to output(%r{cask: #{HOMEBREW_CACHE}/downloads/[\da-f]{64}--caffeine\.zip}).to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
it "prints the cache files for a given Formula and Cask" do
expect { brew "--cache", testball, cask_path("local-caffeine") }
.to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-.*\ncask: #{HOMEBREW_CACHE}/downloads/[\da-f]{64}--caffeine\.zip}).to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
end