aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_uses.rb
blob: b0e79ef2d8dd1b73335a8a030d5123e4d555104d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require "helper/integration_command_test_case"

class IntegrationCommandTestUses < IntegrationCommandTestCase
  def test_uses
    setup_test_formula "foo"
    setup_test_formula "bar"
    setup_test_formula "baz", <<-EOS.undent
      url "https://example.com/baz-1.0"
      depends_on "bar"
    EOS

    assert_equal "", cmd("uses", "baz")
    assert_equal "baz", cmd("uses", "bar")
    assert_equal "bar\nbaz", cmd("uses", "--recursive", "foo")
  end
end