Sha256: 24e2633d2c200010217d50acf5ffabfc7087af1353f6c500ed04c2cde782c3e2

Contents?: true

Size: 622 Bytes

Versions: 42

Compression:

Stored size: 622 Bytes

Contents

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

describe Sunspot::Search do
  it 'should allow access to the data accessor' do
    stub_results(posts = Post.new)
    search = session.search Post do
      data_accessor_for(Post).custom_title = 'custom title'
    end
    search.results.first.title.should == 'custom title'
  end
  
  it 'should re-execute search' do
    post_1, post_2 = Post.new, Post.new
    
    stub_results(post_1)
    search = session.search Post
    search.results.should == [post_1]
    
    stub_results(post_2)
    search.execute!
    search.results.should == [post_2]
  end
end

Version data entries

42 entries across 42 versions & 10 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot-2.2.7/spec/api/search/search_spec.rb
sunspot-2.2.7 spec/api/search/search_spec.rb
sunspot-2.2.6 spec/api/search/search_spec.rb
sunspot-2.2.5 spec/api/search/search_spec.rb
sunspot-2.2.4 spec/api/search/search_spec.rb
sunspot-2.2.3 spec/api/search/search_spec.rb
sunspot-2.2.2 spec/api/search/search_spec.rb
sunspot-2.2.1 spec/api/search/search_spec.rb
sunspot-2.2.0 spec/api/search/search_spec.rb
sunspot-2.1.1 spec/api/search/search_spec.rb
sunspot-2.1.0 spec/api/search/search_spec.rb
sunspot-2.0.0 spec/api/search/search_spec.rb
sunspot-2.0.0.pre.130115 spec/api/search/search_spec.rb
gojee-sunspot-2.0.5 spec/api/search/search_spec.rb
sunspot-2.0.0.pre.120925 spec/api/search/search_spec.rb
sunspot_solr-2.0.0.pre.120924 sunspot/spec/api/search/search_spec.rb
sunspot_rails-2.0.0.pre.120924 sunspot/spec/api/search/search_spec.rb
sunspot-2.0.0.pre.120924 sunspot/spec/api/search/search_spec.rb
gojee-sunspot-2.0.4 spec/api/search/search_spec.rb
gojee-sunspot-2.0.2 spec/api/search/search_spec.rb