diff options
| author | Mike McQuaid | 2016-07-04 17:05:37 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-04 17:05:37 +0100 |
| commit | bf42959609280e023b00a9f185bc5a55acd6f453 (patch) | |
| tree | 73e476242f9a9f2d4c79257b8183548222c80d05 /Library/Homebrew/test/test_integration_cmds.rb | |
| parent | dba1958bd79c1c9d18f215dfc2b806ea62edd1c8 (diff) | |
| download | brew-bf42959609280e023b00a9f185bc5a55acd6f453.tar.bz2 | |
Revert "Revert "Test officially supported cmd taps. (#390)""
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
Diffstat (limited to 'Library/Homebrew/test/test_integration_cmds.rb')
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 37 |
1 files changed, 37 insertions, 0 deletions
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 |
