diff options
| author | Markus Reiter | 2017-02-23 06:01:53 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-23 21:26:52 +0100 |
| commit | 201f3abea033bf02b71de6ec907624a600309042 (patch) | |
| tree | 6b1e49b4906b154f71431408b3249a4977c401ca /Library/Homebrew/test/cmd | |
| parent | 0c0a77030e4ad616746e5b8c2674a2aa2f6f5b28 (diff) | |
| download | brew-201f3abea033bf02b71de6ec907624a600309042.tar.bz2 | |
Convert `brew --prefix` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd')
| -rw-r--r-- | Library/Homebrew/test/cmd/--prefix_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cmd/--prefix_spec.rb b/Library/Homebrew/test/cmd/--prefix_spec.rb new file mode 100644 index 000000000..80ef73a97 --- /dev/null +++ b/Library/Homebrew/test/cmd/--prefix_spec.rb @@ -0,0 +1,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 |
