aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-23 06:06:19 +0100
committerMarkus Reiter2017-02-23 20:59:33 +0100
commit6db95a8f79b6f5e2245929c2c7587bf11d5cff8f (patch)
tree6ec27000bc1225c295028a105af470a86efede93
parentc7121f6be50e44784e3e29114617c29715bd9c0f (diff)
downloadbrew-6db95a8f79b6f5e2245929c2c7587bf11d5cff8f.tar.bz2
Convert `brew unlink` test to spec.
-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