A lot of that does depend on the car. Given their overall dependability, I'd hesitate to drop $2500 into an old Taurus. But an Accord or a Camry I could drive for 5 more years? Hmmm.
But back to the thread subject: spending more than a car is worth to fix it can be looked at several ways. Let's say the car is worth $2500 running and driving but needs a $3000 engine and is otherwise in good condition (tires, brakes, tranny, AC etc are all in decent shape). You can either 1) plop $3000 in this car and drive it 5 years ($600/year for the repairs) or drop that same $3k and an additional, say, $3k (total of $6k) on a used car (we are now looking at $1500 a year, figuring interest only on the additional $3k) or go buy a new car ($25,000 or ~$7000/year for the same five years figuring in interest). None of these figures include maintenance, insurance or gas on the vehicles or the cost of any additional repairs that may be needed. In case number 1, you gotta do what my dad called 'driving it out' because you damn sure can't get your money back by selling it.
But those numbers are why I drive the ol' Trooper and keep fixing it.
I have seen a LOT of people who, when faced with the need for a major service ($600), a set of tires (another $600) and front brakes ($250) at ~45k miles for a total of $1450.00 (we are talking people who do not know how to fix their own cars, remember) instead opted to trade for a new car, thus spending $35K to avoid spending $1450.00. They would then come back to get their personal stuff out of their trade in, smirking at how they showed ME what they though of my big ol' service estimate. I just smile and wave, knowing in three or four years they will be doing it all over again but just getting deeper into debt, because that whole upside down thing will bite them even harder next time.