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.

4 comments:

Sea Cucumber said...

fantastic! more rspec goodness throughout the world.

is this tied to a specific version of rspec or can i plug in any version i want?

Anonymous said...
This comment has been removed by a blog administrator.
pk11 said...

hey mike, i sent you an email about a new waffle feature. please let me know what you think. thanks, peter

Michael Ward said...

RSpec is now included with JRuby 1.0. So the version referred is what is included with JRuby.