Skip to content

Instantly share code, notes, and snippets.

@oc
Created November 29, 2011 10:38
Show Gist options
  • Save oc/1404358 to your computer and use it in GitHub Desktop.
Save oc/1404358 to your computer and use it in GitHub Desktop.
Ashcroft commandments
  1. I am the class being tested. Thou shalt not test any other class but me.
  2. You shall not make for yourself a mock of an API that you don't own.
  3. You shall not call a system or integration test a unit test.
  4. Your unit test suite shall not take all week to run.
  5. [father and mother]
  6. Thou shall not kill the runtime environment.
  7. [adultery]
  8. [steal]
  9. You shall not bear false witness against your neighboring tests.
  10. You shall not covet your system's files, you shall not covet your system's threads, or his sockets, or his graphics environment, or his environment variables, or anything that is part of your system.

EDIT: Credit: Aslak Hellesøy & Obie Fernandez 2004

@oc
Copy link
Author

oc commented Nov 29, 2011

Added credit since this obviously got retweeted :)

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