2016-10-24 22:53:25 +02:00
|
|
|
require "testing_env"
|
2016-09-26 19:55:50 +02:00
|
|
|
|
2016-09-27 00:03:40 +02:00
|
|
|
class IntegrationCommandTestMissing < IntegrationCommandTestCase
|
2016-09-30 14:10:40 +01:00
|
|
|
def setup
|
|
|
|
super
|
|
|
|
|
2016-09-26 19:55:50 +02:00
|
|
|
setup_test_formula "foo"
|
|
|
|
setup_test_formula "bar"
|
2016-09-30 14:10:40 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def make_prefix(name)
|
|
|
|
(HOMEBREW_CELLAR/name/"1.0").mkpath
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_missing_missing
|
|
|
|
make_prefix "bar"
|
2016-09-26 19:55:50 +02:00
|
|
|
|
|
|
|
assert_match "foo", cmd("missing")
|
|
|
|
end
|
2016-09-30 14:10:40 +01:00
|
|
|
|
|
|
|
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
|
2016-09-26 19:55:50 +02:00
|
|
|
end
|