sreedharkesarla / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

unfriendly error when spock used without explicit junit dependency #228

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Not sure if it's a bug but I figured I'll report it.

For a simple gradle project with deps:

dependencies {
    testCompile 'org.spockframework:spock-core:0.5-groovy-1.8@jar',
            'org.objenesis:objenesis:1.2', 'cglib:cglib-nodep:2.2'
}

Any spock test fails with:

Test initializationError(org.gradle.performance.PerformanceTest) FAILED: 
java.lang.Exception: No runnable methods

To solve it, I can simply add 'junit:junit:4.10' to the dependencies.

You might have fixed that in latest snapshot, haven't tested :)

Original issue reported on code.google.com by szcze...@gmail.com on 9 Feb 2012 at 7:53

GoogleCodeExporter commented 8 years ago
It's because you used @jar, which means that JUnit won't get pulled in. I don't 
think there's anything we can do here.

Original comment by pnied...@gmail.com on 9 Feb 2012 at 8:41