I have been trying to create a Groovy project with Spock testing in IntelliJ IDEA.
Here are steps that I followed:
- Created Groovy project and added Maven support.
- Added Spock dependencies and plugin. I am using POM very similar to this one: https://github.com/mariuszs/java-spock-test-sample/blob/master/pom.xml
- Due to conflicting Groovy dependency I removed Groovy 2.2 library from the Module Settings->Libraries. This allowed me to run tests.
- I created a Groovy class in "src/main".. but I get the error when I try to run it:
Groovyc: Cannot compile Groovy files: no Groovy library is defined for module...
I am probably missing something because I am tired of trying different configurations for half of the day.