Installation
CI::Reporter is available as a gem. To install the gem, use the usual gem command:
gem install ci_reporter
To use CI::Reporter as a Rails plugin, first install the gem, and then install the plugin as follows:
script/plugin install http://svn.caldersphere.net/svn/main/plugins/ci_reporter
Usage
CI::Reporter works best with projects that use a Rakefile along with the standard Rake::TestTask or Spec::Rake::SpecTask tasks for running tests or examples, respectively. In this fashion, it hooks into Test::Unit or RSpec using environment variables recognized by these custom tasks to inject the CI::Reporter code into the test or spec runs. If you‘re using the Rails plugin, step 1 is unnecessary; skip to step 2.
- To use CI::Reporter, simply add the following lines to your Rakefile:
require 'rubygems'
gem 'ci_reporter'
require 'ci/reporter/rake/rspec' # use this if you're using RSpec
require 'ci/reporter/rake/test_unit' # use this if you're using Test::Unit - Next, either modify your Rakefile to make the ci:setup:rspec or ci:setup:testunit task a dependency of your test tasks, or include them on the Rake command-line before the name of the task that runs the tests or specs.
rake ci:setup:testunit test
Report files are written, by default, to the test/reports or spec/reports subdirectory of your project. If you wish to customize the location, simply set the environment variable CI_REPORTS (either in the environment, on the Rake command line, or in your Rakefile) to the location where they should go.
Source
You can get the CI::Reporter source using Git, in any of the following ways:
git clone git://git.caldersphere.net/ci_reporter.git
git clone http://git.caldersphere.net/ci_reporter.git
git clone git://github.com/nicksieger/ci_reporter.git