aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-25 06:56:52 +0100
committerGitHub2017-02-25 06:56:52 +0100
commit3470edd61507b6af0271a4a70ad45ea3efda3742 (patch)
tree2d8c87d4b39a7d599b0121703696aab4c794f1a8 /Library/Homebrew/test/cmd
parent798e8ec45bb353982829260e4853a9545de58e53 (diff)
parentb54ba26dde9aad5c1b5fe4f8f1254ed33c100f7a (diff)
downloadbrew-3470edd61507b6af0271a4a70ad45ea3efda3742.tar.bz2
Merge pull request #2164 from reitermarkus/spec-bundle
Convert `brew bundle` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd')
-rw-r--r--Library/Homebrew/test/cmd/bundle_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cmd/bundle_spec.rb b/Library/Homebrew/test/cmd/bundle_spec.rb
new file mode 100644
index 000000000..755f9ab3d
--- /dev/null
+++ b/Library/Homebrew/test/cmd/bundle_spec.rb
@@ -0,0 +1,24 @@
+describe "brew bundle", :integration_test, :needs_test_cmd_taps do
+ describe "check" do
+ it "checks if a Brewfile's dependencies are satisfied" do
+ 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
+
+ Dir.mktmpdir do |path|
+ FileUtils.touch "#{path}/Brewfile"
+ Dir.chdir path 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