Well, isn't that special.
RSpecial is an BRASS-compliant assertions framework. It defines
should handlers and a set of RSpec-compatible matchers
allowing developers to change test frameworks without having to change
a slew of previously defined assertions.
RSpecial utilizes the Assay assertions meta-framework on the back-end. Assay defines assertions in the same way that Ruby defines exceptions. An assertion is nothing more that an extended Exception class. Assay provides a complete set of these assertion classes for all common assertion needs.
To install with RubyGems simply open a console and type:
$ gem install rspecial
Old-school site installations via a tarball can be done with Ruby Setup
gem install setup).
To use RSpecial, simply require the
rspecial script, and include the
Test::Matchers mixin module into your test framework wherever it requires
it (which may be as simple as the top-level namespace).
require 'rspecial' include RSpecial::Matchers
Or more generically,
Now assertions can be made just as if you were using RSpec.
and the traditional way
Compatibility with RSpec is not 100%, but it is close. Compatibility will improve with future releases.
Also error messages aren't always as nice, nor always customizable, as they are in RSpec. This too will improve with future releases.
Please feel obligated to submit a patch if you need a missing a feature ;-)
RSpecial is copyright open source software
Copyright (c) 2012 Rubyworks
This program is distributed under the terms of the BSD-2-Clause license.
See LICENSE.txt file for details.