Merge pull request #2124 from reitermarkus/spec-upgrade

Convert `brew upgrade` test to spec.
This commit is contained in:
Markus Reiter 2017-02-25 07:16:28 +01:00 committed by GitHub
commit 0759c7dcb6
2 changed files with 12 additions and 12 deletions

View File

@ -0,0 +1,12 @@
describe "brew upgrade", :integration_test do
it "upgrades a Formula to the latest version" do
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
shutup do
expect { brew "upgrade" }.to be_a_success
end
expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory
end
end

View File

@ -1,12 +0,0 @@
require "testing_env"
class IntegrationCommandTestUpgrade < IntegrationCommandTestCase
def test_upgrade
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
cmd("upgrade")
assert((HOMEBREW_CELLAR/"testball/0.1").directory?,
"The latest version directory should be created")
end
end