})
	})

	Describe("DebugLogsCommand", func() {
		var debugLogsCommand cli.Command

		BeforeEach(func() {
			commandFactory := command_factory.NewLogsCommandFactory(appExaminer, taskExaminer, terminalUI, fakeTailedLogsOutputter, fakeExitHandler)
			debugLogsCommand = commandFactory.MakeDebugLogsCommand()
		})

		It("tails logs from the lattice-debug stream", func() {
			doneChan := test_helpers.AsyncExecuteCommandWithArgs(debugLogsCommand, []string{})

			Eventually(fakeTailedLogsOutputter.OutputDebugLogsCallCount).Should(Equal(1))
			Expect(fakeTailedLogsOutputter.OutputDebugLogsArgsForCall(0)).To(BeTrue())

			Consistently(doneChan).ShouldNot(BeClosed())
		})

		Context("when the --raw flag is passed", func() {
			It("tails the debug logs without pretty print", func() {
				doneChan := test_helpers.AsyncExecuteCommandWithArgs(debugLogsCommand, []string{"--raw"})

				Eventually(fakeTailedLogsOutputter.OutputDebugLogsCallCount).Should(Equal(1))
				Expect(fakeTailedLogsOutputter.OutputDebugLogsArgsForCall(0)).To(BeFalse())

				Consistently(doneChan).ShouldNot(BeClosed())
			})
		})
	})