lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: how to mock solr server solr_sruby
Date Wed, 22 Feb 2012 13:24:28 GMT
You can mock with Ruby really easily, but just overriding methods that would otherwise call
the server and fake a response.  The solr-ruby library itself was built with an extensive
test suite doing this.  Here's the mock base:


You can see its use here:



On Feb 22, 2012, at 05:30 , solr wrote:

> Hi,
> Am using solr_ruby in ruby code for that am starting solr server by using
> start.jsr.
> Now i want to write mockobjects for solr connection and code written in my
> ruby file to search data from solr.
> Can anybody suggest how to do testing without stating solr server
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message