aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-25 07:03:22 +0100
committerGitHub2017-02-25 07:03:22 +0100
commite393fd5a30e2378addf26d246cb7d16226ae3d77 (patch)
treea5b5d8d53901494bc2e2f320a983ed49729a6b87 /Library/Homebrew
parent1f9faa09a9b472ee8550e2aeefd3d41c7cb3739b (diff)
parent6db95a8f79b6f5e2245929c2c7587bf11d5cff8f (diff)
downloadbrew-e393fd5a30e2378addf26d246cb7d16226ae3d77.tar.bz2
Merge pull request #2125 from reitermarkus/spec-unlink
Convert `brew unlink` test to spec.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/test/cmd/unlink_spec.rb14
-rw-r--r--Library/Homebrew/test/unlink_test.rb10
2 files changed, 14 insertions, 10 deletions
diff --git a/Library/Homebrew/test/cmd/unlink_spec.rb b/Library/Homebrew/test/cmd/unlink_spec.rb
new file mode 100644
index 000000000..5961651fe
--- /dev/null
+++ b/Library/Homebrew/test/cmd/unlink_spec.rb
@@ -0,0 +1,14 @@
+describe "brew unlink", :integration_test do
+ it "unlinks a Formula" do
+ setup_test_formula "testball"
+
+ shutup do
+ expect { brew "install", "testball" }.to be_a_success
+ end
+
+ expect { brew "unlink", "--dry-run", "testball" }
+ .to output(/Would remove/).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+end
diff --git a/Library/Homebrew/test/unlink_test.rb b/Library/Homebrew/test/unlink_test.rb
deleted file mode 100644
index 6d5cefc67..000000000
--- a/Library/Homebrew/test/unlink_test.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require "testing_env"
-
-class IntegrationCommandTestUnlink < IntegrationCommandTestCase
- def test_unlink
- setup_test_formula "testball"
-
- cmd("install", "testball")
- assert_match "Would remove", cmd("unlink", "--dry-run", "testball")
- end
-end