2017-02-23 06:05:56 +01:00
|
|
|
describe "brew uses", :integration_test do
|
|
|
|
it "prints the Formulae a given Formula is used by" do
|
|
|
|
setup_test_formula "foo"
|
|
|
|
setup_test_formula "bar"
|
2017-10-15 02:28:32 +02:00
|
|
|
setup_test_formula "baz", <<~EOS
|
2017-02-23 06:05:56 +01:00
|
|
|
url "https://example.com/baz-1.0"
|
|
|
|
depends_on "bar"
|
|
|
|
EOS
|
|
|
|
|
|
|
|
expect { brew "uses", "baz" }
|
|
|
|
.to be_a_success
|
|
|
|
.and not_to_output.to_stdout
|
|
|
|
.and not_to_output.to_stderr
|
|
|
|
|
|
|
|
expect { brew "uses", "bar" }
|
|
|
|
.to output("baz\n").to_stdout
|
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
|
|
|
|
expect { brew "uses", "--recursive", "foo" }
|
|
|
|
.to output(/(bar\nbaz|baz\nbar)/).to_stdout
|
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
end
|
|
|
|
end
|