From: Matt Berney Date: 2007-03-29T06:23:14+09:00 Subject: passing data to tests with test/unit I have a test case, based on the Test::Unit::TestCase. How does one pass data to the test in such a way that the test can be run multiple times with different input. For example: class TC_CreateOrder < Test::Unit::TestCase def test_NewOrder assert "order successful" end end Now, I want to be able to generate a new order for various order types, (TYPE1, TYPE2, TYPE3, etc.) class TS_OrderTests def self.suite suite = Test::Unit::TestSuite.new suite << TC_CreateOrder.suite # TYPE1 goes here suite << TC_CreateOrder.suite # TYPE2 goes here suite << TC_CreateOrder.suite # TYPE3 goes here return suite end end Test::Unit::UI::Console::TestRunner.run(TS_OrderTests) Thanks in advance. -- Posted via http://www.ruby-forum.com/.