appRunnerCommandFactoryConfig command_factory.AppRunnerCommandFactoryConfig
	)

	BeforeEach(func() {
		fakeAppRunner = &fake_app_runner.FakeAppRunner{}
		fakeAppExaminer = &fake_app_examiner.FakeAppExaminer{}
		outputBuffer = gbytes.NewBuffer()
		terminalUI = terminal.NewUI(nil, outputBuffer, nil)
		fakeClock = fakeclock.NewFakeClock(time.Now())
		fakeTailedLogsOutputter = fake_tailed_logs_outputter.NewFakeTailedLogsOutputter()
		fakeExitHandler = &fake_exit_handler.FakeExitHandler{}
	})

	Describe("helper methods", func() {
		var (
			factory *command_factory.AppRunnerCommandFactory
		)

		BeforeEach(func() {
			appRunnerCommandFactoryConfig := command_factory.AppRunnerCommandFactoryConfig{
				AppRunner:   fakeAppRunner,
				UI:          terminalUI,
				ExitHandler: fakeExitHandler,
				Env:         []string{"AAAAA=1", "AAA=2", "BBB=3"},
			}

			factory = command_factory.NewAppRunnerCommandFactory(appRunnerCommandFactoryConfig)
		})

		Describe("BuildEnvironment", func() {
			It("grabs values from the environment when not in its args", func() {
		appRunnerCommandFactoryConfig command_factory.AppRunnerCommandFactoryConfig
	)

	BeforeEach(func() {
		fakeAppRunner = &fake_app_runner.FakeAppRunner{}
		fakeAppExaminer = &fake_app_examiner.FakeAppExaminer{}
		outputBuffer = gbytes.NewBuffer()
		terminalUI = terminal.NewUI(nil, outputBuffer, nil)
		fakeClock = fakeclock.NewFakeClock(time.Now())
		fakeTailedLogsOutputter = fake_tailed_logs_outputter.NewFakeTailedLogsOutputter()
		fakeExitHandler = &fake_exit_handler.FakeExitHandler{}
	})

	Describe("helper methods", func() {
		var (
			factory *command_factory.AppRunnerCommandFactory
		)

		BeforeEach(func() {
			appRunnerCommandFactoryConfig := command_factory.AppRunnerCommandFactoryConfig{
				AppRunner:   fakeAppRunner,
				UI:          terminalUI,
				ExitHandler: fakeExitHandler,
				Env:         []string{"AAAAA=1", "AAA=2", "BBB=3"},
			}

			factory = command_factory.NewAppRunnerCommandFactory(appRunnerCommandFactoryConfig)
		})

		Describe("BuildEnvironment", func() {
			It("grabs values from the environment when not in its args", func() {
		fakeExitHandler               *fake_exit_handler.FakeExitHandler
		appRunnerCommandFactoryConfig command_factory.AppRunnerCommandFactoryConfig
	)

	BeforeEach(func() {
		fakeAppRunner = &fake_app_runner.FakeAppRunner{}
		fakeAppExaminer = &fake_app_examiner.FakeAppExaminer{}
		outputBuffer = gbytes.NewBuffer()
		terminalUI = terminal.NewUI(nil, outputBuffer, nil)
		fakeClock = fakeclock.NewFakeClock(time.Now())
		fakeTailedLogsOutputter = fake_tailed_logs_outputter.NewFakeTailedLogsOutputter()
		fakeExitHandler = &fake_exit_handler.FakeExitHandler{}
	})

	Describe("helper methods", func() {
		var factory *command_factory.AppRunnerCommandFactory

		BeforeEach(func() {
			appRunnerCommandFactoryConfig := command_factory.AppRunnerCommandFactoryConfig{
				AppRunner:   fakeAppRunner,
				UI:          terminalUI,
				ExitHandler: fakeExitHandler,
				Env:         []string{"AAAAA=1", "AAA=2", "BBB=3"},
			}

			factory = command_factory.NewAppRunnerCommandFactory(appRunnerCommandFactoryConfig)
		})

		Describe("BuildEnvironment", func() {
			It("grabs values from the environment when not in its args", func() {
				envVars := factory.BuildEnvironment([]string{"AAAAA", "CCC=4"})