Allow curl args to be overriden.

This commit is contained in:
Markus Reiter 2017-08-08 22:28:08 +02:00
parent 1a30c165bf
commit 2cba322200
2 changed files with 2 additions and 2 deletions

View File

@ -26,11 +26,11 @@ describe "download strategies", :cask do
downloader.fetch
expect(downloader).to have_received(:curl).with(
cask.url.to_s,
"--location",
"--remote-time",
"--continue-at", "-",
"--output", kind_of(Pathname),
cask.url.to_s,
user_agent: :default
)
end

View File

@ -38,7 +38,7 @@ def curl(*args)
end
def curl_download(*args, to: nil, **options)
curl(*args, "--location", "--remote-time", "--continue-at", "-", "--output", to, **options)
curl("--location", "--remote-time", "--continue-at", "-", "--output", to, *args, **options)
end
def curl_output(*args, **options)