Convert brew upgrade test to spec.

This commit is contained in:
Markus Reiter 2017-02-23 06:07:01 +01:00
parent c7121f6be5
commit 76dfbde447
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