aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-25 06:48:51 +0100
committerGitHub2017-02-25 06:48:51 +0100
commit69cf50cdcb9b8dfa0ea8a3ce98b4212288c563bd (patch)
treeefd4de641bafa9b1b7586f1e0d3f9ee570e0ff3d /Library/Homebrew/test/cmd
parent0c5ddf116e95aada3ff1dd8dbdccb8a894937e3b (diff)
parent9818b82b1bf0142f9f64d3707587ea4684b94dcd (diff)
downloadbrew-69cf50cdcb9b8dfa0ea8a3ce98b4212288c563bd.tar.bz2
Merge pull request #2149 from reitermarkus/spec---repository
Convert `brew --repository` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd')
-rw-r--r--Library/Homebrew/test/cmd/--repository_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cmd/--repository_spec.rb b/Library/Homebrew/test/cmd/--repository_spec.rb
new file mode 100644
index 000000000..d3e531f7b
--- /dev/null
+++ b/Library/Homebrew/test/cmd/--repository_spec.rb
@@ -0,0 +1,15 @@
+describe "brew --repository", :integration_test do
+ it "prints the path of the Homebrew repository" do
+ expect { brew "--repository" }
+ .to output("#{HOMEBREW_REPOSITORY}\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+
+ it "prints the path of a given Tap" do
+ expect { brew "--repository", "foo/bar" }
+ .to output("#{HOMEBREW_LIBRARY}/Taps/foo/homebrew-bar\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+end