How to run single test in JRuby master?

I’d asked on IRC if there was a way to run a single spec in JRuby
Master,
and got a good answer:

Is there an equivalent for running ‘ant test’ that would let me run just
one test file? I’m thinking something along the lines of “ant jar
test-single:name_of_test/test_file” or something, since I would have to
run
a build if I tried changing any .java files.

If I was in a *nix system, I’d probably just && a couple commands
together,
but since I’m on Windows, I’m not sure if there is an equivalent to &&
that
would let me type:

ant jar && bin/jruby.bat test/test_thing_here.rb

-Nick K.

If the test does not depend on test classes, you can usually just run
it directly, as in jruby test/path/to/test_whatever.rb.

If it needs built test classes, pass them to classpath like this:

jruby -J-cp build/classes/test test/path/to/test_whatever.rb

And to make sure those classes are (re)built, ant compile-test.

Maybe there’s a good place for all this in the wiki?

  • Charlie