Closed adamstep closed 11 years ago
It seems to me that you focused the whole container, which IMO should take precedence.
Many of our Cedar BDD projects use a script for removing focus from specs. Perhaps something like this would be useful here as well (to run when you have many focused specs to 'reset' the suite)
On Sat, Nov 16, 2013 at 2:41 PM, Adam Stepinski notifications@github.com wrote:
While using Ginkgo I find myself often using
FDescribe()
while implementing a feature, and then wanting to useFIt()
within the block to debug a specific assertion:FDescribe("some behavior", func() { FIt("some assertion", func(){ ... }) It("some other assertion", func(){ ... }) })
However,
go test
runs all of the specs in the container, not just the focused one. This seems counter-intuitive to me.If you agree that focused specs should take precedence over focused spec containers, I'd be happy to send a PR.
Reply to this email directly or view it on GitHub: https://github.com/onsi/ginkgo/issues/13
I think I agree with Andrew -- at some level this is somewhat subjective: should the outer focus take precedence or the inner focus? I went with the outer focus because it was easier to implement and because it matches the behavior of Cedar (which is one of the inspirations behind Ginkgo).
But I do think we're sorely lacking the "remove all focus" script. I'll add that to the ginkgo
CLI soon.
I've updated the ginkgo cli -- running ginkgo unfocus
removes any programmatically focused tests.
*I should say: it removes the focus from those tests, not the tests themselves!
Awesome, this will definitely help my use case.
While using Ginkgo I find myself often using
FDescribe()
while implementing a feature, and then wanting to useFIt()
within the block to debug a specific assertion:However,
go test
runs all of the specs in the container, not just the focused one. This seems counter-intuitive to me.If you agree that focused specs should take precedence over focused spec containers, I'd be happy to send a PR.