[rspec-devel] Get RSpec output from Tests

aslak hellesoy aslak.hellesoy at gmail.com
Thu Nov 29 09:49:15 EST 2007

Test::Unit integration is getting better, and now you can run classic
Test::Unit tests *unchanged* with RSpec.

For example, I just tried to run mocha's tests and added the following
to its Rakefile:

require 'rubygems'
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new do |t|
  t.ruby_opts = ['-rtest/unit']
  t.spec_files = FileList['test/test*.rb']
  t.spec_opts = ['--format', 'html:spec.html']

And a quick:
rake spec
open spec.html

There is a whole lot of other interop goodies too - mixing TU and
RSpec in code is possible on many levels:
* it blocks in TestCases
* using should in test methods
* using test methods in describe blocks

etc etc.

Migrating gradually from Test::Unit to RSpec has never been easier.


More information about the rspec-devel mailing list