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