Sha256: 313d2bba5c9d056a1c31a74b72022f00edb9fcded656bfd55a89421cb7b565b1

Contents?: true

Size: 1.04 KB

Versions: 53

Compression:

Stored size: 1.04 KB

Contents

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

describe Sunspot::Adapters::InstanceAdapter do
  it "finds adapter by superclass" do
    Sunspot::Adapters::InstanceAdapter::for(Model).should be(AbstractModelInstanceAdapter)
  end

  it "finds adapter by mixin" do
    Sunspot::Adapters::InstanceAdapter::for(MixModel).should be(MixInModelInstanceAdapter)
  end

  it 'throws NoAdapterError if anonymous module passed in' do
    lambda do
      Sunspot::Adapters::InstanceAdapter::for(Module.new)
    end.should raise_error(Sunspot::NoAdapterError)
  end
end

describe Sunspot::Adapters::DataAccessor do
  it "finds adapter by superclass" do
    Sunspot::Adapters::DataAccessor::for(Model).should be(AbstractModelDataAccessor)
  end

  it "finds adapter by mixin" do
    Sunspot::Adapters::DataAccessor::for(MixModel).should be(MixInModelDataAccessor)
  end

  it 'throws NoAdapterError if anonymous module passed in' do
    lambda do
      Sunspot::Adapters::DataAccessor::for(Module.new)
    end.should raise_error(Sunspot::NoAdapterError)
  end
end

Version data entries

53 entries across 53 versions & 12 rubygems

Version Path
Chrononaut-sunspot-client-0.9.4 spec/api/adapters_spec.rb
UnderpantsGnome-sunspot-0.9.1.1 spec/api/adapters_spec.rb
UnderpantsGnome-sunspot-0.9.8.1 spec/api/adapters_spec.rb
benjaminkrause-sunspot-0.9.7 spec/api/adapters_spec.rb
benjaminkrause-sunspot-0.9.8 spec/api/adapters_spec.rb
kristopher-sunspot-0.9.8 spec/api/adapters_spec.rb
kuahyeow-sunspot-0.9.7 spec/api/adapters_spec.rb
kuahyeow-sunspot-0.9.8 spec/api/adapters_spec.rb
outoftime-sunspot-0.8.8 spec/api/adapters_spec.rb
outoftime-sunspot-0.8.9 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.0 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.1 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.2 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.3 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.4 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.5 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.6 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.7 spec/api/adapters_spec.rb
outoftime-sunspot-0.9.8 spec/api/adapters_spec.rb
erichummel-sunspot-1.2.1g spec/api/adapters_spec.rb