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

Merge pull request #2143 from reitermarkus/spec-leaves

Convert `brew leaves` test to spec.
parents 2afe338f c1f70ced
No related branches found
No related tags found
No related merge requests found
describe "brew leaves", :integration_test do
it "prints all Formulae that are not dependencies of other Formulae" do
setup_test_formula "foo"
setup_test_formula "bar"
expect { brew "leaves" }
.to be_a_success
.and not_to_output.to_stdout
.and not_to_output.to_stderr
(HOMEBREW_CELLAR/"foo/0.1/somedir").mkpath
expect { brew "leaves" }
.to output("foo\n").to_stdout
.and not_to_output.to_stderr
.and be_a_success
(HOMEBREW_CELLAR/"bar/0.1/somedir").mkpath
expect { brew "leaves" }
.to output("bar\n").to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
end
require "testing_env"
class IntegrationCommandTestLeaves < IntegrationCommandTestCase
def test_leaves
setup_test_formula "foo"
setup_test_formula "bar"
assert_equal "", cmd("leaves")
(HOMEBREW_CELLAR/"foo/0.1/somedir").mkpath
assert_equal "foo", cmd("leaves")
(HOMEBREW_CELLAR/"bar/0.1/somedir").mkpath
assert_equal "bar", cmd("leaves")
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