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

Merge pull request #2163 from reitermarkus/spec---cache

Convert `brew --cache` test to spec.
parents 625d02f9 2bdeb8d0
No related branches found
No related tags found
No related merge requests found
require "testing_env"
class IntegrationCommandTestCacheFormula < IntegrationCommandTestCase
def test_cache_formula
assert_match %r{#{HOMEBREW_CACHE}/testball-},
cmd("--cache", testball)
end
end
require "testing_env"
class IntegrationCommandTestCache < IntegrationCommandTestCase
def test_cache
assert_equal HOMEBREW_CACHE.to_s,
cmd("--cache")
end
end
describe "brew --cache", :integration_test do
it "print the location of Homebrew's cache when no argument is given" do
expect { brew "--cache" }
.to output("#{HOMEBREW_CACHE}\n").to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
it "prints all cache files for a given Formula" do
expect { brew "--cache", testball }
.to output(%r{#{HOMEBREW_CACHE}/testball-}).to_stdout
.and not_to_output.to_stderr
.and be_a_success
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