It("stores the trace value when --trace flag is provided", func() { runCommand("--trace", "true") Expect(configRepo.Trace()).Should(Equal("true")) runCommand("--trace", "false") Expect(configRepo.Trace()).Should(Equal("false")) runCommand("--trace", "some/file/lol") Expect(configRepo.Trace()).Should(Equal("some/file/lol")) }) }) Context("--color flag", func() { It("stores the color value when --color flag is provided", func() { runCommand("--color", "true") Expect(configRepo.ColorEnabled()).Should(Equal("true")) runCommand("--color", "false") Expect(configRepo.ColorEnabled()).Should(Equal("false")) }) It("fails with usage when a non-bool value is provided", func() { runCommand("--color", "plaid") Expect(ui.FailedWithUsage).To(BeTrue()) }) }) Context("--locale flag", func() { It("stores the locale value when --locale [locale] is provided", func() { runCommand("--locale", "zh_CN") Expect(configRepo.Locale()).Should(Equal("zh_CN"))