From df87dfeb6a15a1c6eba557efb78da65d0a211301 Mon Sep 17 00:00:00 2001 From: Julien Letessier Date: Fri, 16 Feb 2018 10:23:04 +0100 Subject: [PATCH 1/2] Also process FSpecify when unfocusing --- ginkgo/unfocus_command.go | 1 + .../_fixtures/focused_fixture/focused_fixture_test.go | 4 ++++ integration/subcommand_test.go | 8 ++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ginkgo/unfocus_command.go b/ginkgo/unfocus_command.go index 683c3a998..994562b4f 100644 --- a/ginkgo/unfocus_command.go +++ b/ginkgo/unfocus_command.go @@ -26,6 +26,7 @@ func unfocusSpecs([]string, []string) { unfocus("Measure") unfocus("DescribeTable") unfocus("Entry") + unfocus("Specify") } func unfocus(component string) { diff --git a/integration/_fixtures/focused_fixture/focused_fixture_test.go b/integration/_fixtures/focused_fixture/focused_fixture_test.go index 16ad16de1..d2c67751d 100644 --- a/integration/_fixtures/focused_fixture/focused_fixture_test.go +++ b/integration/_fixtures/focused_fixture/focused_fixture_test.go @@ -22,6 +22,10 @@ var _ = Describe("FocusedFixture", func() { }) + FSpecify("focused", func() { + + }) + FMeasure("focused", func(b Benchmarker) { }, 2) diff --git a/integration/subcommand_test.go b/integration/subcommand_test.go index 6a1913ad3..281ab17ae 100644 --- a/integration/subcommand_test.go +++ b/integration/subcommand_test.go @@ -354,8 +354,8 @@ var _ = Describe("Subcommand", func() { Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) output := session.Out.Contents() - Ω(output).Should(ContainSubstring("6 Passed")) - Ω(output).Should(ContainSubstring("5 Skipped")) + Ω(string(output)).Should(ContainSubstring("7 Passed")) + Ω(string(output)).Should(ContainSubstring("5 Skipped")) session = startGinkgo(pathToTest, "blur") Eventually(session).Should(gexec.Exit(0)) @@ -363,8 +363,8 @@ var _ = Describe("Subcommand", func() { session = startGinkgo(pathToTest, "--noColor") Eventually(session).Should(gexec.Exit(0)) output = session.Out.Contents() - Ω(output).Should(ContainSubstring("11 Passed")) - Ω(output).Should(ContainSubstring("0 Skipped")) + Ω(string(output)).Should(ContainSubstring("12 Passed")) + Ω(string(output)).Should(ContainSubstring("0 Skipped")) }) }) From ee65bdb5bff3adf48f039feeb7c59aad6863f97d Mon Sep 17 00:00:00 2001 From: Julien Letessier Date: Fri, 16 Feb 2018 17:33:25 +0100 Subject: [PATCH 2/2] Also process FWhen when unfocusing --- ginkgo/unfocus_command.go | 1 + .../_fixtures/focused_fixture/focused_fixture_test.go | 6 ++++++ integration/subcommand_test.go | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ginkgo/unfocus_command.go b/ginkgo/unfocus_command.go index 994562b4f..203b039c2 100644 --- a/ginkgo/unfocus_command.go +++ b/ginkgo/unfocus_command.go @@ -27,6 +27,7 @@ func unfocusSpecs([]string, []string) { unfocus("DescribeTable") unfocus("Entry") unfocus("Specify") + unfocus("When") } func unfocus(component string) { diff --git a/integration/_fixtures/focused_fixture/focused_fixture_test.go b/integration/_fixtures/focused_fixture/focused_fixture_test.go index d2c67751d..ea500eaf0 100644 --- a/integration/_fixtures/focused_fixture/focused_fixture_test.go +++ b/integration/_fixtures/focused_fixture/focused_fixture_test.go @@ -18,6 +18,12 @@ var _ = Describe("FocusedFixture", func() { }) }) + FWhen("focused", func() { + It("focused", func() { + + }) + }) + FIt("focused", func() { }) diff --git a/integration/subcommand_test.go b/integration/subcommand_test.go index 281ab17ae..5726bf8d3 100644 --- a/integration/subcommand_test.go +++ b/integration/subcommand_test.go @@ -354,7 +354,7 @@ var _ = Describe("Subcommand", func() { Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) output := session.Out.Contents() - Ω(string(output)).Should(ContainSubstring("7 Passed")) + Ω(string(output)).Should(ContainSubstring("8 Passed")) Ω(string(output)).Should(ContainSubstring("5 Skipped")) session = startGinkgo(pathToTest, "blur") @@ -363,7 +363,7 @@ var _ = Describe("Subcommand", func() { session = startGinkgo(pathToTest, "--noColor") Eventually(session).Should(gexec.Exit(0)) output = session.Out.Contents() - Ω(string(output)).Should(ContainSubstring("12 Passed")) + Ω(string(output)).Should(ContainSubstring("13 Passed")) Ω(string(output)).Should(ContainSubstring("0 Skipped")) }) })