a Unit Testing Framework for Ruby - Test::Unit

Test::Unit

Test::Unit is a unit testing framework for Ruby.

Backward compatibility

Test::Unit 1.2.3 is the same version as bundled in Ruby 1.8.

test-unit 1.2.3 reference manual

Instal:

% sudo gem install test-unit -v 1.2.3

Usage:

require "rubygems"
gem "test-unit", "1.2.3"
require "test/unit"

Feature split

Test::Unit splits some packages by feature. e.g. GTK+ test runner is a different package.

Install:

% sudo gem install test-unit-runner-gtk2

Usage:

require "test/unit/runner/gtk2"

You can use --runner=gtk2 option to use GTK+ test runner.

Here are test-unit related packages.

test-unit

This package provides core feature.

test-unit: The latest release

2.3.0 is the latest release. It had been released at 2011-04-17.

test-unit: Install

Install:

% sudo gem install test-unit

Usage:

gem "test-unit"
require "test/unit"

test-unit-full

This is a meta package to use all extension packages described in the below.

test-unit-full: The latest release

0.0.3 is the latest release. It had been released at 2011-02-09.

test-unit-full: Install

Install:

% sudo gem install test-unit-full

Usage:

require "test/unit/full"

test-unit-notify

notification on GNOME notification on Mac OS X
This package provides a test notifier.
X Window System based eivornment such ad GNOME, Xfce, KDE and so on
"notify-send" command is used for notifying test result.
Mac OS X
"growlnotify" command is used for notifying test result.
Windows
How? Growl for Windows? (not implemented)

test-unit-notify: The latest release

0.3.0 is the latest release. It had been released at 2011-04-15.

test-unit-notify: Install

Install:

% sudo gem install test-unit-notify

Usage:

require "test/unit/notify"

You can use --notify option to notify test result by popup at the end.

test-unit-rr

This package provides a RR, a test dobule library, adapter for test-unit 2.

test-unit-rr: The latest release

1.0.1 is the latest release. It had been released at 2011-02-10.

test-unit-rr: Install

Install:

% sudo gem install test-unit-rr

Usage:

require "test/unit/rr"

test-unit-runner-gtk2

This package provides a GTK+ based test runner.

test-unit-runner-gtk2: The latest release

0.0.2 is the latest release. It had been released at 2011-02-09.

test-unit-runner-gtk2: Install

Install:

% sudo gem install test-unit-runner-gtk2

Usage:

require "test/unit/runner/gtk2"

You can use --runner=gtk2 to run tests with GTK+ based test runner.

test-unit-runner-tk

This package provides a Tk based test runner.

test-unit-runner-tk: The latest release

0.0.1 is the latest release. It had been released at 2008-06-17.

test-unit-runner-tk: Install

Install:

% sudo gem install test-unit-runner-tk

Usage:

require "test/unit/runner/tk"

You can use --runner=tk to run tests with Tk based test runner.

test-unit-runner-fox

This package provides a FOX Toolkit based test runner.

test-unit-runner-fox: The latest release

0.0.1 is the latest release. It had been released at 2008-06-17.

test-unit-runner-fox: Install

Install:

% sudo gem install test-unit-runner-fox

Usage:

require "test/unit/runner/fox"

You can use --runner=fox to run tests with Fox toolkit based test runner.

For developers

Test::Unit welcome to your contributions.

Repositories

Test::Unit uses git repository on GitHub. Here is a list to get each source code.

test-unit
% git clone https://github.com/test-unit/test-unit.git
test-unit-full
% git clone https://github.com/test-unit/test-unit-full.git
test-unit-notify
% git clone https://github.com/test-unit/test-unit-notify.git
test-unit-rr
% git clone https://github.com/test-unit/test-unit-rr.git
test-unit-capybara
% git clone https://github.com/test-unit/test-unit-capybara.git
test-unit-runner-gtk2
% git clone https://github.com/test-unit/test-unit-runner-gtk2.git
test-unit-runner-tk
% git clone https://github.com/test-unit/test-unit-runner-tk.git
test-unit-runner-fox
% git clone https://github.com/test-unit/test-unit-runner-fox.git