(My experience in Grail 2.4.5)
For those who are confronted with this question and still stuck, I thought I mentioned a receipt that is easy to miss if you don't create your tests through the command line.
It seems that the Spock test files (and their class names) should be marked with the word "Spec".
for example, in FakeControllerSpec.groovy
:
... @TestFor(FakeController) class FakeControllerSpec extends Specification { ... }
If at this point intellij convinced itself that your test is a junit test (or some other framework other than Spock), you will need to remove the configuration from Run > editConfigurations
before running the test again.
source share