But if you'd rather deal with live data, make sure you run the index
and start tasks for the test environment - eg:
rake ts:in RAILS_ENV=test
rake ts:start RAILS_ENV=test
If that doesn't work, let me know and we can try to figure out what's
going wrong.
Cheers
--
Pat
Two approaches: have a Sphinx setup for testing. Which means setting a
different port for the test environment, and running the rake tasks
for that environment as well.
Or: stub the database-reliant calls. You can also disable delta
indexing via ThinkingSphinx.deltas_enabled = false in your test setup
- but some calls to Sphinx aren't reliant on delta indexes.
Cheers
--
Pat
Not quite familiar with this rspec syntax, but try the following:
SitePage.should_receive(:search) do |term|
term.should eql('*keyword*')
end
Cheers
--
Pat
e: p...@freelancing-gods.com || m: +614 1327 3337
w: http://freelancing-gods.com || t: twitter.com/pat
discworld: http://ausdwcon.org || skype: patallan
I've no idea what the problem is, unfortunately - but I'm not familiar
with the stubbing library you're using.
--
Pat