JustBeforeEach(func() { cmd = NewLightStemcellVDICmd(options, fakeClient) Expect(cmd).ToNot(BeNil()) }) Context("when all required options are passed", func() { It("succeeds with no errors", func() { err = cmd.CheckOptions() Expect(err).ToNot(HaveOccurred()) }) }) Context("when one required option is missing", func() { Context("when Version is missing", func() { BeforeEach(func() { options.VersionFlag = "" }) It("fails with warning that version is missing", func() { err = cmd.CheckOptions() Expect(err.Error()).To(ContainSubstring("must pass a version")) }) }) Context("when Stemcell Info Filename is missing", func() { BeforeEach(func() { options.StemcellInfoFilenameFlag = "" }) It("fails with warning that stemcell-info.json filename flag is missing", func() { err = cmd.CheckOptions()