Skip to content

Instantly share code, notes, and snippets.

@acken
Forked from oc/commandments.md
Created November 29, 2011 12:17
Show Gist options
  • Save acken/1404622 to your computer and use it in GitHub Desktop.
Save acken/1404622 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

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