JRuby & JTestR in Eclipse

Continuing my rampage upon the JRuby community, I have achieved beautiful success with running my tests inside of the eclipse IDE as a JUnit test. Now I have limited knowledge in the JUnit realm and encourage those to improve upon my approach.

In your eclipse Package Manager sidebar, Right Click -#> Run As.. -#> Run Configurations. Go ahead and select ‘JUnit’ and hit the ‘New Launch Configuration’ button.

Fill in the configuration as follows:

* Run a single test
Project: your-project-name
Test class: org.jtestr.ant.JtestRSuite

Now just open the ‘Arguments’ tab and inside the ‘VM arguments:’ box

-Djtestr.junit.tests=rspec_tests

rspec_tests is the folder where my tests are stored, feel free to change this to something like /test/jtestr/funny_test or whatever structure you store your files in.

I am still trying to figure out a more effecient way to get these test to run under eclipse. Till than I can always fall back on this approach as well as the standard ant task.


One Response to “JRuby & JTestR in Eclipse”

  1. RPI Planner | JtestR + Eclipse => Awesome Says:

    [...] just got JtestR up and running inside of Eclipse with the JUnit runner using this guide. It’s truly awesome: I can write pure-RSpec tests, and have them run from inside Eclipse and [...]

Leave a Reply