Shaun Jackman 879f514e28 test/unpack_strategy: Handle svn unzip unavailable
Skip those tests that require svn or unzip.
2018-08-13 14:41:00 -07:00

22 lines
494 B
Ruby

require_relative "shared_examples"
describe UnpackStrategy::Zip do
let(:path) { TEST_FIXTURE_DIR/"cask/MyFancyApp.zip" }
include_examples "UnpackStrategy::detect"
context "when unzip is available", :needs_unzip do
include_examples "#extract", children: ["MyFancyApp"]
end
context "when ZIP archive is corrupted" do
let(:path) {
(mktmpdir/"test.zip").tap do |path|
FileUtils.touch path
end
}
include_examples "UnpackStrategy::detect"
end
end