Merge pull request #2149 from reitermarkus/spec---repository

Convert `brew --repository` test to spec.
This commit is contained in:
Markus Reiter 2017-02-25 06:48:51 +01:00 committed by GitHub
commit 69cf50cdcb
2 changed files with 15 additions and 10 deletions

View File

@ -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

View File

@ -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