Xavier Shay: How I test Rails applications →

Xavier Shay:

I use a different set of categories for my tests:

  • Unit. Do our objects do the right thing, and are they convenient to work with?
  • Integration. Does our code work against code we can’t change?
  • Acceptance. Does the whole system work?

Note that these definitions of unit and integration are radically different to how Rails defines them. […] All of the typical Rails tests fall under the “integration” label.

Xavier then goes on to restate how A test is not a unit test if it talks to the database, communicates across a network, or touches the file system, and what constitutes an acceptance test.