Unless someone advises against it, I don’t want my Rspec suite to be
dependent on having Thinking Sphinx running, as I can often imagine
situations where anyone working on my app would want to run the spec
without the the search engine being powered up. Is there anyway I can
avoid errors like the following;
ThinkingSphinx::ConnectionError in ‘Admin::SitePagesController handling
GET admin/site_pages should render index template’
Connection to Sphinx Daemon (searchd) failed.
Could I stub out the ThinkingSpinx::Connection in the required
controller specs? If so, how do I do this? I’ve tried several methods
but, being a newbie, I haven’t worked it out yet - for example;
controller.stub(ThinkingSphinx::ActiveRecord::Search).and_return(true)
undefined method `to_sym’ for
ThinkingSphinx::ActiveRecord::Search:Module
Any suggestions?