[Wtr-general] Order of execution for ruby tests with test/unit

Paul Rogers paul.rogers at shaw.ca
Thu May 4 23:18:38 EDT 2006


some time ago, maybe August, I posted some code that would do the test in source code order, it created the TestSuite by reading the file first. You can also name your methods like
test_010
test_020

etc

if you use rspec ( rspec.rubyforge.org ) it runs in source order, and provides a very nice way or organizing specifications ( specs are like tests )

Paul

----- Original Message -----
From: Jeff Wood <jeff.darklight at gmail.com>
Date: Thursday, May 4, 2006 5:54 pm
Subject: Re: [Wtr-general] Order of execution for ruby tests with test/unit

> Unit tests are all meant to be atomic, and without order...
> 
> There is not a way to order their execution.  You would have to write
> your own TestSuite class that would let you order them by some means
> ...
> 
> ( basically you would need ot override Test::Unit::TestSuite#run )
> 
> --jw.
> 
> On 5/4/06, George Flaherty <George.Flaherty at sas.com> wrote:
> > Sorry to repeat here, but did someone post a way to execute ruby 
> unit tests in a "predetermined order" vs.
> > the default "random" order?
> >
> >
> > Thanks
> > -george
> >
> >
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> 
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> 



More information about the Wtr-general mailing list