test-unit
test-unit is a xUnit family unit testing framework for Ruby.
Backward compatibility
test-unit 1.2.3 is the same version as bundled in Ruby 1.8.
Instal:
% sudo gem install test-unit -v 1.2.3
Usage:
require "rubygems" gem "test-unit", "1.2.3" require "test/unit"
test-unit 1.2.3 reference manual
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: The core library.
- test-unit-full: A meta package to install test-unit related libraries.
- test-unit-notify: A library to notify test result.
- test-unit-rr: A library to use test double in test-unit.
- test-unit-capybara: A library to write integration test for Rack applications simply in test-unit.
- test-unit-runner-gtk2: A test runner by GTK+.
- test-unit-runner-tk: A test runner by Tk.
- test-unit-runner-fox: A test runner by FOX Toolkit.
test-unit
This package provides core feature.
test-unit: The latest release
2.4.0 is the latest release. It had been released at 2011-09-18.
test-unit: Install
Install:
% sudo gem install test-unit
Usage:
gem "test-unit" require "test/unit"
test-unit: Document
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


- 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-notify: Document
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-rr: Document
test-unit-capybara
This package provides a Capybara, an integration testing helper library for Rack applications, adapter for test-unit 2.
test-unit-capybara: The latest release
1.0.0 is the latest release. It had been released at 2011-05-01.
test-unit-capybara: Install
Install:
% sudo gem install test-unit-capybara
Usage:
require "test/unit/capybara"
class TestMyRackApplication < Test::Unit::TestCase
include Capybara
def setup
Capybara.app = MyRackApplication.new
end
def test_top_page
visit("/")
assert_equal("Welcome!", find("title").text)
end
end
test-unit-capybara: Document
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.
% git clone https://github.com/test-unit/test-unit.git
% git clone https://github.com/test-unit/test-unit-full.git
% git clone https://github.com/test-unit/test-unit-notify.git
% git clone https://github.com/test-unit/test-unit-rr.git
% git clone https://github.com/test-unit/test-unit-capybara.git
% git clone https://github.com/test-unit/test-unit-runner-gtk2.git
% git clone https://github.com/test-unit/test-unit-runner-tk.git
% git clone https://github.com/test-unit/test-unit-runner-fox.git