Skip to content
Snippets Groups Projects
Commit 93e2cb31 authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #2095 from joshliu/spec-deps

Convert deps test to spec
parents 069cf219 ed72e02b
No related branches found
No related tags found
No related merge requests found
describe "brew deps", :integration_test do
before(:each) do
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
end
it "outputs no dependencies for a Formula that has no dependencies" do
expect { brew "deps", "foo" }
.to be_a_success
.and not_to_output.to_stdout
.and not_to_output.to_stderr
end
it "outputs a dependency for a Formula that has one dependency" do
expect { brew "deps", "bar" }
.to be_a_success
.and output("foo\n").to_stdout
.and not_to_output.to_stderr
end
it "outputs all of a Formula's dependencies and their dependencies on separate lines" do
expect { brew "deps", "baz" }
.to be_a_success
.and output("bar\nfoo\n").to_stdout
.and not_to_output.to_stderr
end
end
require "testing_env"
class IntegrationCommandTestDeps < IntegrationCommandTestCase
def test_deps
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
assert_equal "", cmd("deps", "foo")
assert_equal "foo", cmd("deps", "bar")
assert_equal "bar\nfoo", cmd("deps", "baz")
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment