Ah ok, this explain a lot ^^
My test code is groovy but the SUT is groovy++, so I can't use Spock :(

Stefan

On Sun, Jul 3, 2011 at 8:11 PM, Peter Niederwieser <[email protected]> wrote:
>
> Stefan Gojan wrote:
>>
>> I get a ClassFormatError exception if I run junit tests with "gradle
>> test". But only if
>> 1) the test has spaces in the method name
>> 2) the test method has a closure in it
>>
>> In intellij IDEA it runs all fine! Has anyone a hint how to fix this?
>>
>
> Groovy doesn't support non-standard method names. Depending on which Groovy
> version you use, you will always run into problems sooner or later. Closures
> are one example.
>
> Hard to say why it "works" in IDEA. Maybe you have multiple version of
> Groovy on the class path, and the one that IDEA chooses doesn't fail in this
> particular case.
>
> If you want to use non-standard names for your test methods, try Spock,
> which has explicit support for them.
>
> --
> Peter Niederwieser
> Principal Engineer, Gradleware
> http://gradleware.com
> Creator, Spock Framework
> http://spockframework.org
> Twitter: @pniederw
>
>
>
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/ClassFormatError-during-test-run-only-in-gradle-IDEA-works-tp4546885p4547746.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



-- 
http://en.gravatar.com/vollekannehoschi

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to