Merge pull request #2159 from reitermarkus/spec-cleanup
Convert `brew cleanup` test to spec.
This commit is contained in:
commit
1c38fd6f09
@ -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
|
||||
|
12
Library/Homebrew/test/cmd/cleanup_spec.rb
Normal file
12
Library/Homebrew/test/cmd/cleanup_spec.rb
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user