title: What is the difference between integration and unit tests?
body: <p>I know the so-called textbook definition of unit tests and integration tests.  What I am curious about is when it is time to write unit tests... I will write them to cover as many sets of classes as possible.</p>
  
  <p>For example, if I have a <code>Word</code> class, I will write some unit tests for the <code>Word</code> class.  Then, I begin writing my <code>Sentence</code> class, and when it needs to interact with the <code>Word</code> class, I will often write my unit tests such that they test both <code>Sentence</code> and <code>Word</code>... at least in the places where they interact.</p>
  
  <p><em>Have these tests essentially become integration tests because they now test the integration of these 2 classes, or is it just a unit test that spans 2 classes?</em></p>
  
  <p>In general, because of this uncertain line, I will rarely actually write integration tests... or is my using the finished product to see if all the pieces work properly the actual integration tests, even though they are manual and rarely repeated beyond the scope of each individual feature?</p>
  
  <p>Am I misunderstanding integration tests, or is there really just very little difference between integration and unit tests?</p>