Ruby Test Integration With CruiseControl.net

Please use the thread Integrating Ruby On Rails Unit Tests in CruiseControl.net for posting comments about this procedure.

In order to integrate your ruby on rails unit tests into your CruiseControl build process so you can see the test results in the webdashboard, you must peform the following tasks in order:

Installing Test-Report:
require 'test/unit/ui/console/testrunner'

Setting up WebDashboard:
<!-- Example From File: /CruiseControl.NET/webdashboard/dashboard.config -->
<dashboard>
    <plugins>
        <buildPlugins>
            <!-- This is where you insert the following line -->
            <xslReportBuildPlugin description="RUnit Details" actionName="RunitBuildReport" 
                xslFileName="xsl\rubyunittests.xsl />
        </buildPlugins>
    </plugins>
</dashboard>


Configuring Your tests.rb File:
Setting up Your Build Script:
<!-- Run Ruby Unit Tests -->
<Target Name="run-tests">
    <Exec ContinueOnError="false" Command="c:\ruby\bin\ruby.exe tests.rb"
        WorkingDirectory="c:\projects\myrailsapp\">
	<Output TaskParameter="ExitCode" ItemName="ExitCodes"/>
    </Exec>
    <Error Text="One or more Unit Tests failed." Condition="'%(ExitCodes.Identity)'>0"/>
</Target>
<project>
     <!-- Some Build Script Settings -->
     <publishers>
         <merge>
	     <files>
                 <file>C:\Projects\MyRailsApp\TestResults\TEST-MyRailsApp.xml</file>
             </files>
         </merge>
     </publishers>
     <!-- Some Other Build Script Settings -->
</project>


Files:
tests.rb
runit.xsl
test-report-0.3.0.zip (added local copy because rubyforge site is gone!)

Links:
Test-Report Version 0.3.0 - http://test-report.rubyforge.org (site is down or does not exist anymore)
Throughworks CruiseControl.Net - http://cruisecontrol.confluence.net