cleanup: remove cargo_cache

This commit is contained in:
commitay 2018-09-03 18:59:53 +10:00
parent a5af6e8ef4
commit 11a6413fd0
2 changed files with 10 additions and 1 deletions

View File

@ -36,7 +36,7 @@ module CleanupRefinement
end
def nested_cache?
directory? && %w[go_cache glide_home java_cache npm_cache gclient_cache].include?(basename.to_s)
directory? && %w[cargo_cache go_cache glide_home java_cache npm_cache gclient_cache].include?(basename.to_s)
end
def go_cache_directory?

View File

@ -225,6 +225,15 @@ describe Homebrew::Cleanup do
expect(incomplete).not_to exist
end
it "cleans up 'cargo_cache'" do
cargo_cache = (HOMEBREW_CACHE/"cargo_cache")
cargo_cache.mkpath
subject.cleanup_cache
expect(cargo_cache).not_to exist
end
it "cleans up 'go_cache'" do
go_cache = (HOMEBREW_CACHE/"go_cache")
go_cache.mkpath