aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-30 14:10:40 +0100
committerAlyssa Ross2016-10-25 22:34:35 +0100
commit8e3e8e31c23e5ec6e204ee5462cb9d22119891ee (patch)
tree97601c1eed87447e3ecde1b943076e26843cb2fd
parent7fa4ffe3dc3dd577fa04c374cc965c1b6f303632 (diff)
downloadbrew-8e3e8e31c23e5ec6e204ee5462cb9d22119891ee.tar.bz2
missing: add tests for not missing and hide
-rw-r--r--Library/Homebrew/test/test_missing.rb27
1 files changed, 25 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_missing.rb b/Library/Homebrew/test/test_missing.rb
index 3a5fd3df0..565f413da 100644
--- a/Library/Homebrew/test/test_missing.rb
+++ b/Library/Homebrew/test/test_missing.rb
@@ -1,11 +1,34 @@
require "helper/integration_command_test_case"
class IntegrationCommandTestMissing < IntegrationCommandTestCase
- def test_missing
+ def setup
+ super
+
setup_test_formula "foo"
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")
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