Hi everyone,
We're switching from plain Rspec or Rspec + Steak to Cucumber for some of our tests, but every time we run Cucumber, our handcrafted test.sphinx.conf gets trashed by Thinking Sphinx and thus our system no longer works and all tests fail.
The issue is this: We use xmlpipe2 like so:
https://github.com/psy-q/madek/blob/master/config/test.sphinx.conf_with_pipeWhich works well. It seems the trouble with rake cucumber is this part of Thinking Sphinx:
lib/cucumber/thinking_sphinx/external_world.rb
Which reads:
require 'thinking_sphinx/test'
module Cucumber
module ThinkingSphinx
class ExternalWorld
def initialize(suppress_delta_output = true)
::ThinkingSphinx::Test.init
::ThinkingSphinx::Test.start_with_autostop
end
end
end
end
Test.start_with_autostop does this:
def self.start_with_autostop
autostop
start
end
And the trouble is here:
def self.start
config.build
config.controller.index
config.controller.start
end
We don't want config.build to ever happen. I've tried overriding those methods with ones that don't do config.build in an initializer, but it seems that code is never executed when we run the Cucumber tests.
Do you have any suggestions how we could get ThinkingSphinx to stop overwriting its configuration file when using Cucumber?
Cheers,
Ramón