On Fri, Oct 10, 2008 at 10:32:18AM +1100, Chris Lloyd wrote:
> Testing the db just adds another layer which you can't control. If  
> there is something wrong with your db it'll cause all your specs to  
> fail, but not for the reason they should be failing. All the  
> ActiveRecord db stuff has been already tested in the Rails code so  
> there is really no reason to repeat that in your own specs.
> 
> The only time you should be hitting the db really is either in  
> integration tests or stories because that's when you want to check  
> that your whole system works, not just your own code.

The problem with this argument is that the DB is also "your own code", and
needs testing -- and by only doing integration tests with the DB, you're
providing the largest possible area for bugs to hide.  If you've got
DB-level tests, cool, but I've never seen anyone write them or talk about
them...

- Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails Oceania" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to