Skip to content

Instantly share code, notes, and snippets.

@formigarafa
Forked from rponte/gist:1051135
Created June 28, 2011 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save formigarafa/1051633 to your computer and use it in GitHub Desktop.
Save formigarafa/1051633 to your computer and use it in GitHub Desktop.
A test is not a unit test if

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 Tests that do these things aren’t bad. Often they are worth writing, and they can be written in a unit test harness. However, it is important to keep them separate from true unit tests so that we can run the unit tests quickly whenever we make changes.

-- by Michael Feathers

http://www.artima.com/weblogs/viewpost.jsp?thread=126923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment