aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_missing.rb
blob: 565f413daf79d4129cc45045dbdc4afaef28a72c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require "helper/integration_command_test_case"

class IntegrationCommandTestMissing < IntegrationCommandTestCase
  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"

    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