title: How do I test a ruby Mixin Module?
body: <p>I'd like to know the best way to approach testing <strong>ruby mixin modules</strong>, in this case for use with ActiveRecord models, but really this is a general quesiton that applies to any class that you are extending with a mixin.</p>
  
  <p>Is it better to <strong>attempt to stub all of the necessary functionality</strong> of the Class that your mixin is extending, <strong>or just test the real class</strong> as present and extended in your app?</p>
  
  <p>Stubbing would remove external dependencies for the tests, but it fails to test the mixin <em>under real circumstances</em>.  If the test fail, it could be either your implementation or the class you are extending that changed or broke.  If testing with a stubbed class your tests may pass but the <em>functionality could be broken</em> if the class you are extending changes.</p>
  
  <p>Opinions?</p>