Sha256: 7933e234be70a5de128486f2c9285d42391d42e8f6ed1f8a36144c9499aedf6e

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 KB

Contents

class AbstractModel
end

class Model < AbstractModel
end

class UnseenModel < AbstractModel
end

class ModelWithPrefixId < AbstractModel
  def id
    1
  end
end

Sunspot.setup(ModelWithPrefixId) do
  id_prefix { "USERDATA!" }
end

class ModelWithNestedPrefixId < AbstractModel
  def id
    1
  end
end

Sunspot.setup(ModelWithNestedPrefixId) do
  id_prefix { "USER!USERDATA!" }
end

class ModelWithoutPrefixId < AbstractModel
  def id
    1
  end
end

Sunspot.setup(ModelWithoutPrefixId) do
end


class AbstractModelInstanceAdapter < Sunspot::Adapters::InstanceAdapter
  def id
    @instance.id
  end
end

class AbstractModelDataAccessor < Sunspot::Adapters::DataAccessor
  attr_accessor :to_be_injected
end

Sunspot::Adapters::InstanceAdapter.register(AbstractModelInstanceAdapter, AbstractModel)
Sunspot::Adapters::DataAccessor.register(AbstractModelDataAccessor, AbstractModel)


module MixInModel
end

class MixModel
  include MixInModel
end

class MixInModelInstanceAdapter < Sunspot::Adapters::InstanceAdapter
end

class MixInModelDataAccessor < Sunspot::Adapters::DataAccessor
end

Sunspot::Adapters::InstanceAdapter.register(MixInModelInstanceAdapter, MixInModel)
Sunspot::Adapters::DataAccessor.register(MixInModelDataAccessor, MixInModel)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sunspot-2.7.1 spec/mocks/adapters.rb
sunspot-2.7.0 spec/mocks/adapters.rb
sunspot-2.6.0 spec/mocks/adapters.rb
sunspot-2.5.0 spec/mocks/adapters.rb