Sha256: 73524175218abceb45e01cf6e16639ae9e3bf77f0e198606de8d4c5891204ad2
Contents?: true
Size: 583 Bytes
Versions: 39
Compression:
Stored size: 583 Bytes
Contents
module IndexerHelper def config Sunspot::Configuration.build end def connection @connection ||= Mock::Connection.new end def session @session ||= Sunspot::Session.new(config, connection) end 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
39 entries across 39 versions & 10 rubygems