Exemplo n.º 1
0
				plan atc.Plan
			)

			BeforeEach(func() {
				putStepFactory = new(execfakes.FakeStepFactory)
				putStep = new(execfakes.FakeStep)
				putStep.ResultStub = successResult(true)
				putStepFactory.UsingReturns(putStep)
				fakeFactory.PutReturns(putStepFactory)

				fakeDelegate = new(fakes.FakeBuildDelegate)
				fakeDelegateFactory.DelegateReturns(fakeDelegate)

				fakePutDelegate = new(execfakes.FakePutDelegate)
				fakeDelegate.OutputDelegateReturns(fakePutDelegate)

				plan = atc.Plan{
					Location: nil,
					Put: &atc.PutPlan{
						Name: "some output",
					},
				}
			})

			It("constructs the step correctly", func() {
				build, err := execEngine.CreateBuild(buildModel, plan)
				Ω(err).ShouldNot(HaveOccurred())
				build.Resume(logger)

				Ω(fakeFactory.PutCallCount()).Should(Equal(1))