ExitHandler: fakeExitHandler, } commandFactory := command_factory.NewAppRunnerCommandFactory(appRunnerCommandFactoryConfig) removeCommand = commandFactory.MakeRemoveAppCommand() }) It("removes an app", func() { args := []string{"cool"} test_helpers.ExecuteCommandWithArgs(removeCommand, args) Eventually(outputBuffer).Should(test_helpers.Say("Removing cool")) Expect(fakeAppRunner.RemoveAppCallCount()).To(Equal(1)) Expect(fakeAppRunner.RemoveAppArgsForCall(0)).To(Equal("cool")) }) It("removes multiple apps", func() { args := []string{ "app1", "app2", "app3", } test_helpers.ExecuteCommandWithArgs(removeCommand, args) Expect(outputBuffer).To(test_helpers.SayLine("Removing app1...")) Expect(outputBuffer).To(test_helpers.SayLine("Removing app2...")) Expect(outputBuffer).To(test_helpers.SayLine("Removing app3..."))