buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhett Sutphin <rh...@detailedbalance.net>
Subject Re: system properties for unit tests
Date Mon, 26 Apr 2010 19:45:43 GMT
Hi Jeremy,

On Apr 26, 2010, at 2:22 PM, Jeremy Huiskamp wrote:

> Hi folks,
>
> I'm trying to set some system properties for my junit test code to  
> pick up.  I'm specifying them like so:
>
> $ jruby -J-Dkey=value -S buildr clean test
>
> The system props are picked up by the main buildr process, but not  
> being passed on to the jvm instance used to run the unit tests.  Am  
> I missing something simple?  I'm planning on looking into  
> environment/profile switching but a simple sysprop setting mechanism  
> would be ideal for me at the moment.

You can pass system properties on to the junit runner:

test.using :properties => { :key => "value" }

This is covered in the "languages" section of the docs:  http://buildr.apache.org/languages.html

Rhett

>
> Thanks,
> Jeremy


Mime
View raw message