aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/--prefix_spec.rb
blob: 80ef73a975fd0a326ffcb0b1d9f5ccc4a8ea1ae5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
describe "brew --prefix", :integration_test do
  it "prints the Homebrew prefix when no argument is given" do
    expect { brew "--prefix" }
      .to output("#{HOMEBREW_PREFIX}\n").to_stdout
      .and not_to_output.to_stderr
      .and be_a_success
  end

  it "prints a given Formula's prefix" do
    expect { brew "--prefix", testball }
      .to output(%r{#{HOMEBREW_CELLAR}/testball}).to_stdout
      .and not_to_output.to_stderr
      .and be_a_success
  end
end