aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-23 05:59:04 +0100
committerMarkus Reiter2017-02-23 21:40:17 +0100
commitb54ba26dde9aad5c1b5fe4f8f1254ed33c100f7a (patch)
treef37d34598b364aadaf43fd9736c9bf1a5ff79ed0 /Library
parentc7121f6be50e44784e3e29114617c29715bd9c0f (diff)
downloadbrew-b54ba26dde9aad5c1b5fe4f8f1254ed33c100f7a.tar.bz2
Convert `brew bundle` test to spec.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/bundle_test.rb22
-rw-r--r--Library/Homebrew/test/cmd/bundle_spec.rb24
2 files changed, 24 insertions, 22 deletions
diff --git a/Library/Homebrew/test/bundle_test.rb b/Library/Homebrew/test/bundle_test.rb
deleted file mode 100644
index ae47977d8..000000000
--- a/Library/Homebrew/test/bundle_test.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-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
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