spec/unit/thinking_sphinx/attribute_spec.rb in DrMark-thinking-sphinx-0.9.8 vs spec/unit/thinking_sphinx/attribute_spec.rb in DrMark-thinking-sphinx-0.9.9

- old
+ new

@@ -197,11 +197,15 @@ @attribute.model = Person @first_join = Object.stub_instance(:aliased_table_name => "tabular") @second_join = Object.stub_instance(:aliased_table_name => "data") - @first_assoc = ThinkingSphinx::Association.stub_instance(:join => @first_join) - @second_assoc = ThinkingSphinx::Association.stub_instance(:join => @second_join) + @first_assoc = ThinkingSphinx::Association.stub_instance( + :join => @first_join, :has_column? => true + ) + @second_assoc = ThinkingSphinx::Association.stub_instance( + :join => @second_join, :has_column? => true + ) end it "should return the column name if the column is a string" do @attribute.columns = [ThinkingSphinx::Index::FauxColumn.new("string")] @attribute.send(:column_with_prefix, @attribute.columns.first).should == "string" \ No newline at end of file