From bf42959609280e023b00a9f185bc5a55acd6f453 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 4 Jul 2016 17:05:37 +0100 Subject: Revert "Revert "Test officially supported cmd taps. (#390)"" This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8. --- Library/Homebrew/test/test_integration_cmds.rb | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index cc8f3b458..9b37fa545 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -17,6 +17,12 @@ class IntegrationCommandTests < Homebrew::TestCase @formula_files.each(&:unlink) end + def needs_test_cmd_taps + unless ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"] + skip "HOMEBREW_TEST_OFFICIAL_CMD_TAPS is not set" + end + end + def cmd_id_from_args(args) args_pretty = args.join(" ").gsub(TEST_TMPDIR, "@TMPDIR@") test_pretty = "#{self.class.name}\##{name}.#{@cmd_id_index += 1}" @@ -668,4 +674,35 @@ class IntegrationCommandTests < Homebrew::TestCase ensure desc_cache.unlink end + + def test_bundle + needs_test_cmd_taps + HOMEBREW_REPOSITORY.cd do + shutup do + system "git", "init" + system "git", "commit", "--allow-empty", "-m", "This is a test commit" + end + end + + mktmpdir do |path| + FileUtils.touch "#{path}/Brewfile" + Dir.chdir path do + assert_equal "The Brewfile's dependencies are satisfied.", + cmd("bundle", "check") + end + end + ensure + FileUtils.rm_rf HOMEBREW_REPOSITORY/".git" + end + + def test_cask + needs_test_cmd_taps + assert_equal "Warning: nothing to list", cmd("cask", "list") + end + + def test_services + needs_test_cmd_taps + assert_equal "Warning: No services available to control with `brew services`", + cmd("services", "list") + end end -- cgit v1.2.3