aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/cmd')
-rw-r--r--Library/Homebrew/test/cmd/--prefix_spec.rb15
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