I use the sunspot-rails for search. These is a Rspec looks like:
describe \"GET search\" do
before(:all) do
system(\"rake\", \"sunspot:solr:start\")
end
I got this working just by adding
`rake sunspot:solr:start RAILS_ENV=test`
to spec_helper.rb
Edit: I ended up going with https://github.com/collectiveidea/sunspot_test like Simmo mentioned. It was re-running the rake task on every test run for some reason (even though I had it in the prefork block of spork). Not sure why, but the sunspot_test gem seems like the way to go for now.