From: Intransition Date: 2010-07-06T21:53:45+09:00 Subject: Re: MiniTest test case execution On Jul 6, 5:09 am, George Thomas wrote: > Hi, > > I have MiniTest derived class to run the test cases. > > Its something as follows > > class CustomClass < MiniTest::Unit::TestCase > def test1 > end > def test2 > end > ..... > ..... > def testn > end > end > > My requirement is that if the logic inside test1 fails , I do not want > to execute other tests. (test2 onwards) > > (Calling exit , seem to be exiting from test1 only) > > How can I do that? You can't. The order of test execution is not guaranteed. You might try putting test2+ in a separate file. You might alos just turn test1 into a conditional and only define test2+ if the condition passes. e.g. if test1_condition def test2 ...