homebrew-cask-versions/test/support/cleanup.rb
Paul Hinze d318192854 change cleanup strategy; should speed up tests
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.
2013-12-14 08:45:54 -06:00

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