Merge pull request #2124 from reitermarkus/spec-upgrade
Convert `brew upgrade` test to spec.
This commit is contained in:
commit
0759c7dcb6
12
Library/Homebrew/test/cmd/upgrade_spec.rb
Normal file
12
Library/Homebrew/test/cmd/upgrade_spec.rb
Normal 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
|
@ -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
|
|
Loading…
x
Reference in New Issue
Block a user