2017-02-23 01:54:44 -05:00
|
|
|
describe "brew deps", :integration_test do
|
|
|
|
before(:each) do
|
2017-02-21 20:14:21 -05:00
|
|
|
setup_test_formula "foo"
|
|
|
|
setup_test_formula "bar"
|
|
|
|
setup_test_formula "baz", <<-EOS.undent
|
|
|
|
url "https://example.com/baz-1.0"
|
|
|
|
depends_on "bar"
|
|
|
|
EOS
|
2017-02-23 01:54:44 -05:00
|
|
|
end
|
|
|
|
|
2017-02-23 05:02:41 -05:00
|
|
|
it "outputs no dependencies for a Formula that has no dependencies" do
|
2017-02-23 05:25:24 -05:00
|
|
|
expect { brew "deps", "foo" }
|
|
|
|
.to output("").to_stdout
|
2017-02-23 01:54:44 -05:00
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
end
|
|
|
|
|
2017-02-23 05:02:41 -05:00
|
|
|
it "outputs a dependency for a Formula that has one dependency" do
|
2017-02-23 05:25:24 -05:00
|
|
|
expect { brew "deps", "bar" }
|
|
|
|
.to output("foo\n").to_stdout
|
2017-02-23 01:54:44 -05:00
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
end
|
2017-02-21 20:14:21 -05:00
|
|
|
|
2017-02-23 05:25:24 -05:00
|
|
|
it "outputs all of a Formula's dependencies and their dependencies on separate lines" do
|
|
|
|
expect { brew "deps", "baz" }
|
|
|
|
.to output("bar\nfoo\n").to_stdout
|
2017-02-23 01:54:44 -05:00
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
2017-02-21 20:14:21 -05:00
|
|
|
end
|
|
|
|
end
|