aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/cleanup_spec.rb
blob: 9e2cf493f8ed91bc0e73bbcae59f5209564ebf02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
describe "brew cleanup", :integration_test do
  describe "--prune=all" do
    it "removes all files in Homebrew's cache" do
      (HOMEBREW_CACHE/"test").write "test"

      expect { brew "cleanup", "--prune=all" }
        .to output(%r{#{Regexp.escape(HOMEBREW_CACHE)}/test}).to_stdout
        .and not_to_output.to_stderr
        .and be_a_success
    end
  end
end