aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/cleanup_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-23 06:00:11 +0100
committerMarkus Reiter2017-02-23 21:36:39 +0100
commite7190b9ae2ec39c98e9eb05e33edd1098f8f9085 (patch)
tree7aedb2c41ed6380d268de241b4c0826a7f81e6fc /Library/Homebrew/test/cmd/cleanup_spec.rb
parentc7121f6be50e44784e3e29114617c29715bd9c0f (diff)
downloadbrew-e7190b9ae2ec39c98e9eb05e33edd1098f8f9085.tar.bz2
Convert `brew cleanup` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd/cleanup_spec.rb')
-rw-r--r--Library/Homebrew/test/cmd/cleanup_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cmd/cleanup_spec.rb b/Library/Homebrew/test/cmd/cleanup_spec.rb
new file mode 100644
index 000000000..9e2cf493f
--- /dev/null
+++ b/Library/Homebrew/test/cmd/cleanup_spec.rb
@@ -0,0 +1,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