I am preparing a couple of packages for release on RAA (they are
ports of Perl packages), and have done some unit tests in RubyUnit; I
have read somewhere that Test::Unit is the successor to RubyUnit –
is this the case, and if so, what is the real difference between
them? Are they similar enough to be able to use either, depending on
what is available on the system?
-austin
– Austin Ziegler, austin@halostatue.ca on 2002.10.14 at 18.59.59
I am preparing a couple of packages for release on RAA (they are
ports of Perl packages), and have done some unit tests in RubyUnit; I
have read somewhere that Test::Unit is the successor to RubyUnit –
is this the case,
Yes it is. The packages have been combined and RubyUnit is no longer
actively maintained.
[…] Are they similar enough to be able to use either, depending on
what is available on the system?
Test::Unit does have a RubyUnit emulation mode, so writing to Test::Unit
is probably your best bet.
Converting from RubyUnit to Test::Unit is pretty easy. Generally it
involves …
-
Changing “require ‘runit’” to “require ‘test/unit’”.
-
Changing
class TestXYZ < RUNIT::TestCase
to
class TestXYZ < Test::Unit::Testcase
-
Change and “assert_equals” to “assert_equal”, and any
“assert_exception” to “assert_raises”
···
On Mon, 2002-10-14 at 19:05, Austin Ziegler wrote:
“Beware of bugs in the above code; I have only proved it correct,
not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)