jastrachan | 5 Jul 12:05 2004

Re: Running unit tests with the groovy command-line tool

On 5 Jul 2004, at 10:52, Laforge Guillaume wrote:
>> One minor nitpick, we might want to do the 2nd test case (does it
>> extend GroovyTestCase) using reflection or something to avoid a
>> ClassNotFoundException if folks are using the GroovyShell embedded
>> inside some environment where junit is not on the classpath. No biggie
>> though.
> You must have read my post a bit too quickly :-))))

Damn, you're right - apologies!

> I explained that I'm calling the TestRunner and checking if a class 
> extends GroovyTestCase through reflection for two reasons:
> 1) in case you don't have JUnit in your path it won't throw a 
> ClassNotFoundException
> 2) it doesn't add a dependency on JUnit when Groovy is embedded in a 
> J2EE environment or Java app (no need for a junit.jar when embedding 
> groovy)

Great stuff! :)

I'll try read email more carefully in future :) (pesky jet-lag!)