Skip to content
Snippets Groups Projects
Commit 1c38fd6f authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #2159 from reitermarkus/spec-cleanup

Convert `brew cleanup` test to spec.
parents e7fcc39c e7190b9a
No related branches found
No related tags found
No related merge requests found
......@@ -5,13 +5,6 @@ require "fileutils"
require "pathname"
require "testing_env"
class IntegrationCommandTestCleanup < IntegrationCommandTestCase
def test_cleanup
(HOMEBREW_CACHE/"test").write "test"
assert_match "#{HOMEBREW_CACHE}/test", cmd("cleanup", "--prune=all")
end
end
class CleanupTests < Homebrew::TestCase
def setup
super
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment