Michael Feathers has this to say on the subject.
A test is not a unit test if:
It talks to the database
It communicates across the network
It touches the file system
It can't run at the same time as any of your other unit tests
You have to do special things to your environment (such as editing config files) to run it.
I’ll give you that you want to avoid these things if at all possible, but I only absolutely agree with the final 2. A unit test that exercises a class that talks to the database, communicates across the network, or touches the file system, must, in fact, talk to the database, communicate across the network, or touch the file system. I understand where he’s going with these, as unit tests of these kinds leave “stuff” behind after they’re run, which is a very bad thing for a unit test to do. I handle this problem with my setup/teardown methods, though, or occasional by exception handling (yecch!) in the unit test itself.