aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/bundle_spec.rb
blob: c2434254e266bbbb73c5f7893fe56b2c45982d70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
describe "brew bundle", :integration_test, :needs_test_cmd_taps do
  describe "check" do
    it "checks if a Brewfile's dependencies are satisfied", :needs_network do
      setup_remote_tap "homebrew/bundle"

      HOMEBREW_REPOSITORY.cd do
        system "git", "init"
        system "git", "commit", "--allow-empty", "-m", "This is a test commit"
      end

      mktmpdir do |path|
        FileUtils.touch "#{path}/Brewfile"
        path.cd do
          expect { brew "bundle", "check" }
            .to output("The Brewfile's dependencies are satisfied.\n").to_stdout
            .and not_to_output.to_stderr
            .and be_a_success
        end
      end
    end
  end
end