Merge pull request #2125 from reitermarkus/spec-unlink

Convert `brew unlink` test to spec.
This commit is contained in:
Markus Reiter 2017-02-25 07:03:22 +01:00 committed by GitHub
commit e393fd5a30
2 changed files with 14 additions and 10 deletions

View File

@ -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

View File

@ -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