Sha256: bad074f8a0e00354a212e1dcbd21c7a3322b91b64d10a857cdbcbd595785fc0a
Contents?: true
Size: 1.2 KB
Versions: 200
Compression:
Stored size: 1.2 KB
Contents
# require 'spec_helper' # # describe Query::Solr do # # describe 'real server' do # before(:each) do # @server = Query::Solr.new # end # # describe 'execute' do # context 'error cases' do # before(:each) do # @tokens = stub :tokens # end # context 'tokens are malformed' do # # end # context 'server returns strange values' do # # end # context 'server raises' do # before(:each) do # @server.stub! :select => lambda { raise Solr::RequestError } # end # it 'should not fail' do # @tokens.stub! :to_solr_query => '' # # lambda { @server.execute(@tokens) }.should_not raise_error # end # end # end # end # end # # context 'with connected Server' do # before(:each) do # @server = stub :server # RSolr.stub! :connect => @server # end # end # # context 'without connected server' do # before(:each) do # RSolr.should_receive(:connect).and_raise RuntimeError # end # it 'should have a nil server' do # Query::Solr.new(:some_index_type).server.should == nil # end # end # # end
Version data entries
200 entries across 200 versions & 1 rubygems