Sha256: dea3218612a0647533ec09336a65cd3bfab009e688853265a7914e32314e2a59

Contents?: true

Size: 562 Bytes

Versions: 15

Compression:

Stored size: 562 Bytes

Contents

require 'acceptance/spec_helper'

describe 'Searching for just instance Ids', :live => true do
  it "returns just the instance ids" do
    pancakes = Article.create! :title => 'Pancakes'
    waffles  = Article.create! :title => 'Waffles'
    index

    Article.search_for_ids('pancakes').to_a.should == [pancakes.id]
  end

  it "works across the global context" do
    article = Article.create! :title => 'Pancakes'
    book    = Book.create! :title => 'American Gods'
    index

    ThinkingSphinx.search_for_ids.to_a.should =~ [article.id, book.id]
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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