In JUnit 3, I could get the name of the currently running test like this:
public class MyTest extends TestCase {
public void testSomething() {
assertThat(getName(), is("testSomething"));
}
}
How do I do this in spock? I would like to use the test name as a key in a shared resource so that tests don't interfere with each other.