Sha256: 75b0ae805b90601e356a36d489346f910ad9feaef22906d83be6bdaf8e27bf5e

Contents?: true

Size: 462 Bytes

Versions: 15

Compression:

Stored size: 462 Bytes

Contents

require 'acceptance/spec_helper'

describe 'Get search result counts', :live => true do
  it "returns counts for a single model" do
    4.times { |i| Article.create :title => "Article #{i}" }
    index

    Article.search_count.should == 4
  end

  it "returns counts across all models" do
    3.times { |i| Article.create :title => "Article #{i}" }
    2.times { |i| Book.create :title => "Book #{i}" }
    index

    ThinkingSphinx.count.should == 5
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
thinking-sphinx-3.2.0 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.1.4 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.1.3 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.1.2 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.1.1 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.1.0 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.6 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.5 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.4 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.3 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.2 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.1 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.0 spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.0.rc spec/acceptance/search_counts_spec.rb
thinking-sphinx-3.0.0.pre spec/acceptance/search_counts_spec.rb