On 30/05/10 10:25 AM, Peter Niederwieser wrote:
Today I tried Gradle 0.9-preview-1 and noticed that messages of failed Spock tests no longer appear anywhere - not on the console, not in HTML reports, not in XML test results (with Gradle 0.8 this works fine). I think the problem is that, for some reason, the AssertionError's (subclasses) thrown by Spock get translated to AssertionFailedError's (a JUnit 3 class), but the exception message isn't successfully copied over because Spock's exception classes return null for getMessage(). This can be considered a Spock bug and will be fixed (probably I've never hit this problem before because all the tools calls toString() and print that). But why does Gradle now translate all exceptions (at least all AssertionError's) to AssertionFailedError's? Is this an intentional change?
It certainly wasn't intentional. Whatever was causing it seems to have since gone away, as I'm not seeing this problem in head. Possibly it was related to some interaction between Gradle's and Ant's junit classes. We don't use any of the Ant classes any more.
I've made a change in head to make sure that the exception's toString() is used instead of getMessage().
These fixes will be in 0.9-preview-2, which I hope to finish up today or tomorrow.
-- Adam Murdoch Gradle Developer http://www.gradle.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
