Topic: Anybody handled functionaltesting for solr in rails app

Hi friends,
         Is anybody written test cases for solr connection in our controller.
I have written code in my controller is

solr_connection = Solr::Connection.new(http://localhost:8983/solr/")
solr_connection..query(params[:query])

How to handle functionaltestign without start solrserver externally.Anybody used mock/stub
If so ,help me how you did