July 26, 2007

Run your JRuby RSpec tests from Maven

On my most recent project we made heavy use of RSpec. After 6+ months of using it I must admit that I am a big fan. Therefor I was very happy to see that JRuby included RSpec within its distro (see JRuby bundles RSpec).

I have also been working on adding JRuby support for Waffle. So I decided to write my Ruby tests for Waffle with RSpec. Additionally, I wanted these RSpec tests to run as part of the build. Waffle, like many Java open source projects, uses Maven 2. Regardless of whether you love or hate Maven its dependency and repository convention have became a standard way to easily distribute jars. So I wrote an Maven plug-in that allows you to execute your RSpec tests from Maven. We have since contributed this to Codehaus' Mojo Project. So give it a look if you have the need.



** Ruby support within Waffle will allow developers to write their Controllers, and other objects, with straight Ruby syntax. Look for more info on this functionality soon.