Sha256: 08c5ec09bd80d044191a8896390d868c47691107fd2aef8547b5af0959755b09

Contents?: true

Size: 386 Bytes

Versions: 49

Compression:

Stored size: 386 Bytes

Contents

module IndexerHelper
  def post(attrs = {})
    @post ||= Post.new(attrs)
  end

  def last_add
    @connection.adds.last
  end

  def value_in_last_document_for(field_name)
    @connection.adds.last.last.field_by_name(field_name).value
  end

  def values_in_last_document_for(field_name)
    @connection.adds.last.last.fields_by_name(field_name).map { |field| field.value }
  end
end

Version data entries

49 entries across 49 versions & 9 rubygems

Version Path
sunspot-2.5.0 spec/helpers/indexer_helper.rb
sunspot-2.4.0 spec/helpers/indexer_helper.rb
sunspot-2.3.0 spec/helpers/indexer_helper.rb
sunspot-2.2.8 spec/helpers/indexer_helper.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot-2.2.7/spec/helpers/indexer_helper.rb
sunspot-2.2.7 spec/helpers/indexer_helper.rb
sunspot-2.2.6 spec/helpers/indexer_helper.rb
sunspot-2.2.5 spec/helpers/indexer_helper.rb
sunspot-2.2.4 spec/helpers/indexer_helper.rb
sunspot-2.2.3 spec/helpers/indexer_helper.rb
sunspot-2.2.2 spec/helpers/indexer_helper.rb
sunspot-2.2.1 spec/helpers/indexer_helper.rb
sunspot-2.2.0 spec/helpers/indexer_helper.rb
sunspot-2.1.1 spec/helpers/indexer_helper.rb
sunspot_stats-0.0.7 spec/helpers/indexer_helper.rb
sunspot-2.1.0 spec/helpers/indexer_helper.rb
sunspot_stats-0.0.6 spec/helpers/indexer_helper.rb
sunspot_suggest-0.0.3 spec/helpers/indexer_helper.rb
sunspot_suggest-0.0.2 spec/helpers/indexer_helper.rb
sunspot_suggest-0.0.1 spec/helpers/indexer_helper.rb