From: Gennady Date: 2003-05-20T23:52:29+09:00 Subject: Re: Test cases dependencies? You can find huge discussion waves on the subject in ruby-talk archives (www.ruby-talk.org), one of them quite recently. Gennady. ----- Original Message ----- From: "Laurent Sansonetti" To: "ruby-talk ML" Sent: Tuesday, May 20, 2003 1:00 AM Subject: Test cases dependencies? > Hi rubyists ;-) > > Is it possible to create dependencies between ``test_'' methods, in a > Test::Unit::TestCase object? > > For instance, imagine the following: > > # Tests the ``foo'' library. > require 'test/unit' > class TC_foo < Test::Unit::TestCase > def test_init > # Test if the foo library can be initialized. > end > def test_bar > # Test the ``bar'' method of the foo library. > # This test requires that the library was > # correctly initialized before. > end > end > > If I run this sample, Test::Unit will firstly execute ``test_bar'', and > secondly ``test_init'', because ``bar'' cames before ``init'' in the > alphabetical order. > > I would like that ``test_bar'' depends of ``test_init''. > > Any ideas? > > -- > Laurent > > >