Sha256: 3c62303349a2192d63ad1206c11fd9901a1d4b3801f46bbb5103218a9b9c0170
Contents?: true
Size: 871 Bytes
Versions: 12
Compression:
Stored size: 871 Bytes
Contents
require 'spec_helper' describe SolrWrapper do # WebMock messes with HTTP.rbs ability to stream responses before(:all) do WebMock.disable! end after(:all) do WebMock.enable! end describe ".wrap" do it "should launch solr" do SolrWrapper.wrap do |solr| expect do Timeout::timeout(15) do TCPSocket.new('127.0.0.1', solr.port).close end end.not_to raise_exception end end end describe '.instance' do context 'without arguments' do it 'inherits the defaults' do expect(SolrWrapper.instance.port).to eq '8983' end end end describe ".default_instance_options=" do it "sets default options" do SolrWrapper.default_instance_options = { port: '1234' } expect(SolrWrapper.default_instance_options[:port]). to eq '1234' end end end
Version data entries
12 entries across 12 versions & 2 rubygems