2018-07-23 20:59:21 +02:00
|
|
|
require_relative "shared_examples"
|
|
|
|
|
|
|
|
describe UnpackStrategy::Subversion do
|
2018-07-30 16:59:51 +02:00
|
|
|
let(:repo) { mktmpdir }
|
|
|
|
let(:working_copy) { mktmpdir }
|
2018-07-23 20:59:21 +02:00
|
|
|
let(:path) { working_copy }
|
|
|
|
|
2018-07-30 16:59:51 +02:00
|
|
|
before(:each) do
|
|
|
|
system "svnadmin", "create", repo
|
|
|
|
|
|
|
|
system "svn", "checkout", "file://#{repo}", working_copy
|
|
|
|
|
|
|
|
FileUtils.touch working_copy/"test"
|
|
|
|
system "svn", "add", working_copy/"test"
|
|
|
|
system "svn", "commit", working_copy, "-m", "Add `test` file."
|
|
|
|
end
|
|
|
|
|
2018-07-23 20:59:21 +02:00
|
|
|
include_examples "UnpackStrategy::detect"
|
|
|
|
include_examples "#extract", children: ["test"]
|
2018-07-30 16:59:51 +02:00
|
|
|
|
|
|
|
context "when the directory name contains an '@' symbol" do
|
|
|
|
let(:working_copy) { mktmpdir(["", "@1.2.3"]) }
|
|
|
|
|
|
|
|
include_examples "#extract", children: ["test"]
|
|
|
|
end
|
2018-07-23 20:59:21 +02:00
|
|
|
end
|