Sha256: c2f0048b3f098e1e781acbb2c3087daf584747dccd4b9c583107a16e80c7a4e4

Contents?: true

Size: 911 Bytes

Versions: 13

Compression:

Stored size: 911 Bytes

Contents

require File.expand_path('spec_helper', File.dirname(__FILE__))

describe 'standard query', :type => :query do
  it_should_behave_like "scoped query"
  it_should_behave_like "query with advanced manipulation"
  it_should_behave_like "query with connective scope"
  it_should_behave_like "query with dynamic field support"
  it_should_behave_like "facetable query"
  it_should_behave_like "fulltext query"
  it_should_behave_like "query with highlighting support"
  it_should_behave_like "sortable query"
  it_should_behave_like "query with text field scoping"
  it_should_behave_like "geohash query"

  it 'adds a no-op query to :q parameter when no :q provided' do
    session.search Post do
      with :title, 'My Pet Post'
    end
    connection.should have_last_search_with(:q => '*:*')
  end

  private

  def search(*classes, &block)
    classes[0] ||= Post
    session.search(*classes, &block)
  end
end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
sunspot-1.3.3 spec/api/query/standard_spec.rb
sunspot-1.3.2 spec/api/query/standard_spec.rb
sunspot-1.3.1 spec/api/query/standard_spec.rb
cb_sunspot-2.0.0.pre.5 spec/api/query/standard_spec.rb
cb_sunspot-2.0.0.pre.3 spec/api/query/standard_spec.rb
cb_sunspot-2.0.0.pre3 spec/api/query/standard_spec.rb
sunspot-1.3.0 spec/api/query/standard_spec.rb
pduey-sunspot-1.2.1.1 spec/api/query/standard_spec.rb
sunspot-1.3.0.rc6 spec/api/query/standard_spec.rb
erichummel-sunspot-1.2.1 spec/api/query/standard_spec.rb
lisausa-sunspot-1.2.1 spec/api/query/standard_spec.rb
sunspot_rbg-1.3.1 spec/api/query/standard_spec.rb
sunspot_rbg-1.3.0 spec/api/query/standard_spec.rb