ugh, 2 seconds after submitting this I figured out the solution:
test.using :java_args => [ '-ea' ]
Pregunta
Does anyone know how to enableassertions during testing? I'm trying to use buildr to for a lucene based project and I get the following exception:
[junit] Test class requires enabled assertions, enable globally (-ea) or for Solr/Lucene subpackages only:
I've tried from the command line:
JAVA_OPTS=-ea buildr
and putting the following in my buildfile:
ENV['JAVA_OPTS'] ||= '-enableAssertions'
I'm using the java version of buildr (1.4.12)
Solución
ugh, 2 seconds after submitting this I figured out the solution:
test.using :java_args => [ '-ea' ]
Otros consejos
I had same issue with SOLR and eclipse, solution is exactly the same.
In package explorer right click on project: Run As->Run Configurations...->JUnit->ProjectName->Arguments(second tab)->VM arguments
Type in :-ea