Sha256: a1adb49e7f160595cce874e5e53e9e16e7493a1a4242b355a8b3daaa43163367
Contents?: true
Size: 883 Bytes
Versions: 11
Compression:
Stored size: 883 Bytes
Contents
require 'spec_helper' describe 'AbstractAdapter' do before :all do @adapter = DataMapper::Adapters::AbstractAdapter.new(:abstract, :foo => 'bar') @adapter_class = @adapter.class @scheme = DataMapper::Inflector.underscore(DataMapper::Inflector.demodulize(@adapter_class).chomp('Adapter')) @adapter_name = "test_#{@scheme}".to_sym end describe 'initialization' do describe 'name' do it 'should have a name' do @adapter.name.should == :abstract end end it 'should set options' do @adapter.options.should == {:foo => 'bar'} end it 'should set naming conventions' do @adapter.resource_naming_convention.should == DataMapper::NamingConventions::Resource::UnderscoredAndPluralized @adapter.field_naming_convention.should == DataMapper::NamingConventions::Field::Underscored end end end
Version data entries
11 entries across 11 versions & 3 rubygems