} }) Describe("BuildDropletCommand", func() { var buildDropletCommand cli.Command BeforeEach(func() { commandFactory := droplet_runner_command_factory.NewDropletRunnerCommandFactory(appRunnerCommandFactory, fakeBlobStoreVerifier, fakeTaskExaminer, fakeDropletRunner, fakeCFIgnore, fakeZipper, config) buildDropletCommand = commandFactory.MakeBuildDropletCommand() fakeBlobStoreVerifier.VerifyReturns(true, nil) }) Context("when the archive path is a folder and exists", func() { BeforeEach(func() { fakeCFIgnore.ShouldIgnoreStub = func(path string) bool { return path == "some-ignored-file" } }) It("zips up current working folder and uploads as the droplet name", func() { fakeZipper.IsZipFileReturns(false) fakeZipper.ZipReturns("xyz.zip", nil) test_helpers.ExecuteCommandWithArgs(buildDropletCommand, []string{"droplet-name", "http://some.url/for/buildpack"}) Expect(outputBuffer).To(test_helpers.SayLine("Uploading application bits...")) Expect(outputBuffer).To(test_helpers.SayLine("Uploaded.")) Expect(fakeBlobStoreVerifier.VerifyCallCount()).To(Equal(1)) Expect(fakeBlobStoreVerifier.VerifyArgsForCall(0)).To(Equal(config))