destDir = filepath.Join(tmpPath, "destination") request = InRequest{ Source: s3resource.Source{ Bucket: "bucket-name", Regexp: "files/a-file-(.*).tgz", }, Version: s3resource.Version{ Path: "files/a-file-1.3.tgz", }, } s3client = &fakes.FakeS3Client{} command = NewInCommand(s3client) s3client.URLReturns("http://google.com") }) AfterEach(func() { err := os.RemoveAll(tmpPath) Ω(err).ShouldNot(HaveOccurred()) }) It("creates the destination directory", func() { Ω(destDir).ShouldNot(ExistOnFilesystem()) _, err := command.Run(destDir, request) Ω(err).ShouldNot(HaveOccurred()) Ω(destDir).Should(ExistOnFilesystem()) })