RSpec Plug-in is a Maven plug-in for JRuby and RSpec .
It allows you to execute your JRuby RSpec tests as part of your build.
You need to configure your projects pom.xml correctly:
Refer to the following pom.xml as an example:
<project>
<build>
<!-- Make sure your Ruby files are included -->
<resources>
<resource>
<directory>src/main/ruby</directory>
<includes>
<include>**/*.rb</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rspec-maven-plugin</artifactId>
<configuration>
<!-- jrubyHome points to the JRuby installation you wish to use (usually ${env.JRUBY_HOME}) -->
<jrubyHome>${env.JRUBY_HOME}</jrubyHome>
<!-- sourceDirectory references where your RSpec tests reside -->
<sourceDirectory>${basedir}/src/test/specs</sourceDirectory>
<!-- outputDirectory specifies where the RSpec report should be placed -->
<outputDirectory>${basedir}/target</outputDirectory>
</configuration>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>spec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Stable releases are available via the Mojo repository mojo repository .
Snapshot releases are available via the Mojo snapshots repository mojo snapshot repository .