Merge pull request #2130 from reitermarkus/spec-fetch

Convert `brew fetch` test to spec.
This commit is contained in:
Markus Reiter 2017-02-25 03:26:51 +01:00 committed by GitHub
commit 2afe338f42
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