<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -389,7 +389,7 @@ module ThoughtBot # :nodoc:
             assert reflection, &quot;#{klass.name} does not have any relationship to #{association}&quot;
             assert_equal :has_many, reflection.macro
 
-            associated_klass = (reflection.options[:class_name] || association.to_s.classify).constantize
+            associated_klass = (reflection.options[:source] || reflection.options[:class_name] || association).to_s.classify.constantize
 
             if through
               through_reflection = klass.reflect_on_association(through)</diff>
      <filename>lib/shoulda/active_record_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ class Post &lt; ActiveRecord::Base
   belongs_to :owner, :foreign_key =&gt; :user_id, :class_name =&gt; 'User'
   has_many :taggings
   has_many :tags, :through =&gt; :taggings
+  has_many :through_tags, :through =&gt; :taggings, :source =&gt; :tags
   
   validates_uniqueness_of :title
   validates_presence_of :title</diff>
      <filename>test/rails_root/app/models/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@ class PostTest &lt; Test::Unit::TestCase
   should_belong_to :user
   should_belong_to :owner
   should_have_many :tags, :through =&gt; :taggings
+  should_have_many :through_tags, :through =&gt; :taggings
   
   should_require_unique_attributes :title
   should_require_attributes :body, :message =&gt; /wtf/</diff>
      <filename>test/unit/post_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4c5768d1630bbfc522c6019eede33fb1b2e6c57f</id>
    </parent>
  </parents>
  <author>
    <name>Bob Showalter</name>
    <email>showaltb@gmail.com</email>
  </author>
  <url>http://github.com/showaltb/shoulda/commit/6bcb32d4db981963420bd8e25389ddd1ea883615</url>
  <id>6bcb32d4db981963420bd8e25389ddd1ea883615</id>
  <committed-date>2008-07-29T07:35:14-07:00</committed-date>
  <authored-date>2008-07-29T07:35:14-07:00</authored-date>
  <message>should_have_many: add support for :source option on has_many :through</message>
  <tree>58ae9151642f96541914005b8ebc7184d4287df3</tree>
  <committer>
    <name>Bob Showalter</name>
    <email>showaltb@gmail.com</email>
  </committer>
</commit>
