Convert brew fetch test to spec.

This commit is contained in:
Markus Reiter 2017-02-23 06:05:33 +01:00
parent c7121f6be5
commit 91601ae3d9
2 changed files with 13 additions and 11 deletions

View File

@ -0,0 +1,13 @@
describe "brew fetch", :integration_test do
it "downloads the Formula's URL" do
setup_test_formula "testball"
expect(HOMEBREW_CACHE/"testball-0.1.tbz").not_to exist
shutup do
expect { brew "fetch", "testball" }.to be_a_success
end
expect(HOMEBREW_CACHE/"testball-0.1.tbz").to exist
end
end

View File

@ -1,11 +0,0 @@
require "testing_env"
class IntegrationCommandTestFetch < IntegrationCommandTestCase
def test_fetch
setup_test_formula "testball"
cmd("fetch", "testball")
assert((HOMEBREW_CACHE/"testball-0.1.tbz").exist?,
"The tarball should have been cached")
end
end