title: Strange problem with Sunspot.
body: <p>I have model:</p>
  
  <pre><code>class Topic &lt; ActiveRecord::Base
    attr_accessible :title, :description
  
    has_many :comments, :dependent =&gt; :destroy
  end
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>class Comment &lt; ActiveRecord::Base
    attr_accessible :body, :topic_id
    belongs_to :topic
  end
  </code></pre>
  
  <p>In my <code>topic_spec.rb</code>:</p>
  
  <pre><code>  it "should have the right associated comment" do
        @topic.comments.should include(@comment)
      end
  
      it "should destroy associated comments" do
        @topic.destroy
        Comment.find_by_id(@comment.id).should be_nil
      end
  </code></pre>
  
  <p>And I receive following errors:</p>
  
  <pre><code>1)   Failure/Error: @topic.comments.should == @comment
       NameError:
         undefined method `inspect' for class `ActiveRecord::Associations::CollectionProxy'
  </code></pre>
  
  <hr>
  
  <pre><code>2) Failure/Error: Comment.find_by_id(@comment.id).should be_nil
     expected: nil
          got: #&lt;Comment id: 1, body: "first", created_at: "2011-08-18 09:55:06", updated_at: "2011-08-18 09:55:06"&gt;
  </code></pre>
  
  <p>What I doing wrong? This errors appeared after I started using sunspot. </p>
  
  <p>In my topic.rb: </p>
  
  <pre><code>  searchable :auto_index =&gt; true, :auto_remove =&gt; true do
      text :title, :boost =&gt; 5
      text :description
  
      text :comments do
        comments.map(&amp;:body)
      end
    end
  </code></pre>
  
  <p>If I commented this lines:</p>
  
  <pre><code>#    text :comments do
  #      comments.map(&amp;:body)
  #    end
  </code></pre>
  
  <p>All tests successfully pass!</p>