aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/cmd/--repository_spec.rb15
-rw-r--r--Library/Homebrew/test/repository_test.rb10
2 files changed, 15 insertions, 10 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
diff --git a/Library/Homebrew/test/repository_test.rb b/Library/Homebrew/test/repository_test.rb
deleted file mode 100644
index 77967a58d..000000000
--- a/Library/Homebrew/test/repository_test.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require "testing_env"
-
-class IntegrationCommandTestRepository < IntegrationCommandTestCase
- def test_repository
- assert_match HOMEBREW_REPOSITORY.to_s,
- cmd("--repository")
- assert_match "#{HOMEBREW_LIBRARY}/Taps/foo/homebrew-bar",
- cmd("--repository", "foo/bar")
- end
-end