blob: 1ccdf4ef422b07d5cb60b9bfe1968176a1066474 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
describe Hbc::Container::Naked, :cask do
it "saves files with spaces in them from uris with encoded spaces" do
cask = Hbc::Cask.new("spacey") do
url "http://example.com/kevin%20spacey.pkg"
version "1.2"
end
path = "/tmp/downloads/kevin-spacey-1.2.pkg"
expected_destination = cask.staged_path.join("kevin spacey.pkg")
expected_command = ["/usr/bin/ditto", "--", path, expected_destination]
Hbc::FakeSystemCommand.stubs_command(expected_command)
container = Hbc::Container::Naked.new(cask, path, Hbc::FakeSystemCommand)
expect {
container.extract
}.not_to raise_error
expect(Hbc::FakeSystemCommand.system_calls[expected_command]).to eq(1)
end
end
|