Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.
rubyunworksPublic archive

About

TestUnit Assertions on Assay

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Assay TestUnit

This project is retired. Assay TestUnit is part of Assay since version 0.5: require 'assay/testunit'. The gem remains on RubyGems and the code remains here for reference.

Homepage / Report Issue / Source Code / Mailing List


Assay TestUnit is a compatibility layer for using TestUnit's assertion notation with any BRASS-compliant test framwwork. This allows developers to change test frameworks without having to change a slew of previously defined assertions calls.

Assay TestUnit is built on top of the Assay assertions framework. Assay TestUnit defines a set of TestUnit-compatible assertion methods which depend on Assay's assertion classes. Assay defines assertions in the same way that Ruby defines exceptions. An assertion is nothing more that an extended Exception subclass. Assay provides a complete set of these assertion classes for all common assertion needs. See Assay project for more information on this library.

Synopsis

Simply require the assay/testunit script, and include the Assay::TestUnit::Assertions or Assay::Assertions mixin module into your test scope, where your test framework requires it (which may be as simple as the toplevel namespace).

require 'assay/testunit'

include Assay::Assertions

Now assertions can be made just as if you were using TestUnit.

assert_equal(10, 5+5)

assert_kind_of(Integer, 10)

Limitations

Compatibility is not 100%, though it is very close. Compatibility will improve with future releases. Please feel obligated to submit a patch if you need a missing a feature ;)

Assay TestUnit is also a Ruby 1.9+ only library.

Installation

Via RubyGems

To install with RubyGems simply open a console and type:

$ gem install assay-testunit

Via Setup.rb (not recommended)

Site installation with the tarball can be done with Ruby Setup (gem install setup). See http://rubyworks.github.com/setup.

License & Copyright

Copyright (c) 2012 Rubyworks

This program is distributed under the terms of the BSD-2-Clause license.

See COPYING.rdoc file for details.

About

TestUnit Assertions on Assay

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages