Topic: Unit Tests Stopped Running - Confused

I've been running rake on my project consistently for months, and it always runs unit tests then functional tests.  Now all the sudden it only runs functional tests.  I know that I can run the unit tests explicitly, but I liked it when they both ran with just 'rake'.  I've been trying to think of what I've changed, and I can't think of anything.

Has anyone run into this?

Re: Unit Tests Stopped Running - Confused

I know I saw this briefly for when I was just starting out (all of three weeks ago), I'm wracking my brain to remember what I did...  I assume you've been checking your testing logs, etc; I seem to remember seeing something a little odd in the logs that helped me track down the problem...  Just looked back over my notes from that era and I see I made a note to record what I figured out, but I never got around to it....shoot...

My RoR journey  -- thoughts on learning RoR and lessons learned in applying TDD and agile practices.

Re: Unit Tests Stopped Running - Confused

Ahhh, I think I remember it now ... watching "rake test" run helped trigger it...

There seems to be a problem sometimes with how the db:prepare task sometimes gets confused.  (If you run "rake test --trace" you might notice some weirdness when it gets to this task.

The fix I found (unsatisfying, but it worked for me) was to edit the db:prepare task to always use db:test:clone_structure and not db:test:clone  (ie make both :sql and :db point to clone_structure.

Hope this helps

Last edited by NielsenE (2006-06-18 00:16:50)

My RoR journey  -- thoughts on learning RoR and lessons learned in applying TDD and agile practices.

Re: Unit Tests Stopped Running - Confused

I ran rake db:test:purge, then rake test.  That worked, and now when I run rake it works fine.  I dunno. Thanks for the help.