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
This is a wild-ass guess, but I bet you have a Solr server configured in your config/environments/development.rb file to look locally on a given port, but no such configuration in your config/environments/test.rb
This is causing it to connect to the default address/port where you do not in fact have a Solr server running when you execute your tests.
I don't know enough about the Solr client in Ruby to be sure of this, but since no one else has weighed in yet I hope this points you in the right direction.