missing: add tests for not missing and hide
This commit is contained in:
parent
7fa4ffe3dc
commit
8e3e8e31c2
@ -1,11 +1,34 @@
|
|||||||
require "helper/integration_command_test_case"
|
require "helper/integration_command_test_case"
|
||||||
|
|
||||||
class IntegrationCommandTestMissing < IntegrationCommandTestCase
|
class IntegrationCommandTestMissing < IntegrationCommandTestCase
|
||||||
def test_missing
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
setup_test_formula "foo"
|
setup_test_formula "foo"
|
||||||
setup_test_formula "bar"
|
setup_test_formula "bar"
|
||||||
|
end
|
||||||
|
|
||||||
|
def make_prefix(name)
|
||||||
|
(HOMEBREW_CELLAR/name/"1.0").mkpath
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_missing_missing
|
||||||
|
make_prefix "bar"
|
||||||
|
|
||||||
(HOMEBREW_CELLAR/"bar/1.0").mkpath
|
|
||||||
assert_match "foo", cmd("missing")
|
assert_match "foo", cmd("missing")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_missing_not_missing
|
||||||
|
make_prefix "foo"
|
||||||
|
make_prefix "bar"
|
||||||
|
|
||||||
|
assert_empty cmd("missing")
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_missing_hide
|
||||||
|
make_prefix "foo"
|
||||||
|
make_prefix "bar"
|
||||||
|
|
||||||
|
assert_match "foo", cmd("missing", "--hide=foo")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user