Using 2.5.1-groovy-4.0 with Ant #1857
-
Hi, As of now I know that the class SpecClassFileSelector.java is removed from spock. Could any one can explain me how to incorporate this class in the spock? is it needs to follow the same package name or can I use different package name and place it in the runtime classpath ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As you can see in the removed example at https://github.com/spockframework/spock-example/blob/7d231048200fe4164e4e857da7be0988d6af2424/build.xml, you specify that class manually in your Ant file, so you can put it anywhere in your test sources. Here the last version of the file before removal: https://github.com/spockframework/spock/blob/03818ed010f4b4ca1136a292e214f79d518c4abe/spock-core/src/main/java/org/spockframework/buildsupport/ant/SpecClassFileSelector.java But actually, I doubt that will work anyway. I did not try it, but I think the |
Beta Was this translation helpful? Give feedback.
As you can see in the removed example at https://github.com/spockframework/spock-example/blob/7d231048200fe4164e4e857da7be0988d6af2424/build.xml, you specify that class manually in your Ant file, so you can put it anywhere in your test sources.
Here the last version of the file before removal: https://github.com/spockframework/spock/blob/03818ed010f4b4ca1136a292e214f79d518c4abe/spock-core/src/main/java/org/spockframework/buildsupport/ant/SpecClassFileSelector.java
But actually, I doubt that will work anyway. I did not try it, but I think the
junit
task is just for running JUnit 4 tests which Spock 1.x was based on. As Spock 2+ is a JUnit 5 Platform engine, you most probably have to use the …