},
				)
			})

			It("returns the error", func() {
				err := container.CopyIn("/src", "/dst")
				Expect(err).To(Equal(nastyError))
			})
		})
	})

	Describe("Copying out", func() {
		It("rsyncs from vcap@container:/src to /dst", func() {
			fakeRunner.ServerRootPath = "/host"

			err := container.CopyOut("/src", "/dst", "")
			Expect(err).ToNot(HaveOccurred())

			Expect(fakeRunner).To(HaveExecutedSerially(
				fake_command_runner.CommandSpec{
					Path: "rsync",
					Args: []string{
						"-e",
						"/depot/some-id/bin/wsh --socket /depot/some-id/run/wshd.sock --rsh",
						"-r",
						"-p",
						"--links",
						"vcap@container:/src",
						"/host/dst",
					},
				},