[rspec-users] rspec tests and acts_as_solr models

Martin Streicher martin.streicher at gmail.com
Tue Sep 23 09:33:06 EDT 2008

I would like to use rspec to test a model that leverages acts_as_solr.  
I think I want to render rebuild_solr_index and solr_commit and  
perhaps other methods that call out to the Solr server moot by having  
those functions simply return true. (I will build other tests to make  
sure my Solr configuration
works properly.)

Can anyone make suggestions on how to best approach this? Shall I just  
open the class and redefine certain methods? Or is there a way for me  
to disable Solr for all classes while running rspec?


More information about the rspec-users mailing list