Ruby unit test :run a test class from the main class
In Ruby unit testing can I run a test class from another class
for 开发者_如何学JAVAexa
class Foo < Test::Unit:: TestCase
test_abc()
test_bnd()
Now i want to run this above test suite from my main class
so how could i do it I tried using runner
but dono wat should be argument to the run
method
Test::Unit::UI::Console::TestRunner.run(FOO)
, Regards
That is correct(refer http://www.ensta.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html)
require 'test/unit/ui/console/testrunner'
Test::Unit::UI::Console::TestRunner.run(TC_MyTest)
精彩评论