Sha256: afd98bc86fe1356ed3bc867e8b047dcf9e3ce46c21390f68a363c9c9eb28f1f6
Contents?: true
Size: 703 Bytes
Versions: 17
Compression:
Stored size: 703 Bytes
Contents
# frozen_string_literal: true require 'acceptance/spec_helper' describe 'Executing multiple searches in one Sphinx call', :live => true do it "returns results matching the given queries" do pancakes = Article.create! :title => 'Pancakes' waffles = Article.create! :title => 'Waffles' index batch = ThinkingSphinx::BatchedSearch.new batch.searches << Article.search('pancakes') batch.searches << Article.search('waffles') batch.populate expect(batch.searches.first).to include(pancakes) expect(batch.searches.first).not_to include(waffles) expect(batch.searches.last).to include(waffles) expect(batch.searches.last).not_to include(pancakes) end end
Version data entries
17 entries across 17 versions & 1 rubygems