Hi again. First, thanks for your quick reply and sorry about the delay with mine. An insane week last one.
On 12 mar, 08:07, Pat Allan <[email protected]> wrote: > Are you using transactions for your tests? Because Sphinx can't operate with > those. Also, are you using ThinkingSphinx::Test? I highly recommend you do, > as you shouldn't need to use any of the TS rake tasks from within your > tests... > > In particular: > ThinkingSphinx::Test.index 'affiliates_address_core' I am aware of the limitations with transactions and of ThinkingSphinx::Test. I am going to try a little example with some code to explain myself. I am using has_many_polymorphs and Rspec with Steak so I have a before(:each) block like this: before(:each) do # DB is empty here. Affiliate1.create.addresses << Address.create Affiliate2.create.addresses << Address.create # ... And so on until all needed relations are in DB. I ensured with debugger. ThinkingSphinx::Test.index ThinkingSphinx::Test.start end Then I run the examples with "use_transactional_fixtures = false". All test upon Thinking Sphinx fail (they don't find what is expected) and when I look at "config/test.sphinx.conf", the tables from the polymorphic relation don't appear in the sql_query. It only shows the join with the addresses table (the one for the non-polymorphic association). Hope this time I have come with a better explanation :) -- Rodrigo García Suárez -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
