aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/--cache_spec.rb
blob: fb3c9cee6c4918808faba91d13edf5136aa51b8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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