Steve,
seeing as the database gets whipped between each test (not unit test,
method test), it also whips the object itself im pretty sure so as to
start each and every test with a clean slate as they should.
if a test depends on another test then call it before the rest of the
test. if tests just ran in a row using crap other tests left behind
would bring you to random bugs in your tests and causing you to think
your app is broken.
On 8/9/05, Steve Downey <sldowney-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
wrote:> 1. Starting up my app in WEBrick on my old XP box takes about 9
> seconds. It takes about 10 seconds to run the smallest unit test on a
> model. Is that about right? I imagine it has to load the entire
> application to do the tests?
>
> 2. My app is inquiry-only on a legacy application, and I cannot do any
> inserts (and no prospect) for a test database (don''t ask). I
remove the
> fixture references from the generated unit tests and commented out the
> delete statement in fixtures.rb just to be safe. I made the test db in
> the database.yml file point to a MySQL db on localhost. Anything I can
> do to speed things up?
>
> 3. Can I control the order of tests? They seem to be in alphabetical
> order of method name. Some of my tests to things to Class variables, so
> the order matters.
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>