Hi Jeremy,
This is a bit more of a Spock question than Geb question so probably asking on StackOverflow and tagging your question with spock would get you more responses to it.
Anyhow, when I find myself wanting to apply code from setup() method in a spec to only a subset of feature methods then I either:
- move the code from setup() into a different method and then call that method at the top of each feature method I want the setup code to apply to
- split the spec into two - one which contains all of the methods that I want the setup code in question applied to and one with methods that I don't want the setup code applied to.
As far as I can tell there is no way to apply code from setup() to only a subset of methods in the spec without splitting things up a bit.
Cheers,
Marcin