mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
the test cleanup was using an old strategy that loaded every cask to search for ones that are installed. with the number of casks approaching 1000, this was adding ~0.5s __per test__. switching to the newer strategy that bases off of files in a dir speeds this up, which improves the build time drastically.
14 lines
255 B
Ruby
14 lines
255 B
Ruby
module Cask::CleanupHooks
|
|
def after_teardown
|
|
super
|
|
Cask.installed.each do |cask|
|
|
Cask::Installer.new(cask).tap do |installer|
|
|
installer.purge_files
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
class MiniTest::Spec
|
|
include Cask::CleanupHooks
|
|
end
|