aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/bundle_test.rb
blob: ae47977d840e3ed367ce635d41859ba3e76eb9f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require "testing_env"

class IntegrationCommandTestBundle < IntegrationCommandTestCase
  def test_bundle
    needs_test_cmd_taps
    setup_remote_tap("homebrew/bundle")
    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
  end
end