<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">&quot;But otherwise, what exactly are you testing?&quot;&nbsp; <br></blockquote>That&#39;s a great point.&nbsp; I don&#39;t want to be specing Rails if it is not easily separable for testing already.&nbsp; In theory, I would like to have true unit tests for my models.&nbsp; However, in practice, some of my models are coupled to some degree.&nbsp; 
<br><br>Generally speaking, I prefer not to mock/stub Rails internals to test my app.&nbsp; I don&#39;t find mocking/stubbing *my* code -- that is fine with me.&nbsp; But the internals of Rails are *not* what I&#39;m trying to test.
<br><br>In particular, I found that mocking/stubbing with has_many :through was far from simple.&nbsp; I fired up ruby-debug (highly recommended!) and everything, but realized it was too much effort and too little time.&nbsp; In this sense, my experience is probably similar to Scott&#39;s (above post).
<br><br>My Goal model, for example, checks to see how many Contributions it
has.&nbsp; It uses a has_many :through (hmt) association.&nbsp; Despite the
helpful words of some posters in this thread, I couldn&#39;t find a way to
effectively spec the hmt association.&nbsp; By the time I had stubbed out enough to make
it a true unit test, I was no longer testing what I wanted to test --
namely, that the association itself.&nbsp; <br>
<br>
Maybe this was a wake up call that there was not point in trying to
test that at a unit level?&nbsp; In any case, I&#39;ve got some conditional
logic that connects with the association, so I definitely need to test
that, at least.<br><br>In the end, I just tested the &quot;interaction&quot; between models.&nbsp; In this folder, I test how models in my app work together.&nbsp; I didn&#39;t think these specs fit under &#39;model&#39; because they are testing more than one model.
<br><br>So I put them in a new directory called &#39;model_integration&#39; folder under the &#39;spec&#39; directory.&nbsp; I came up with
this name on my own intuition, and I can&#39;t blame anyone else if this is
a bad idea.&nbsp; I wasn&#39;t sure if &#39;model_interaction&#39; would have been a better name, but from what I gather, &#39;interaction&#39; is a special term when it comes to testing.&nbsp; Suggestions?<br><br>-DJ<br>