Skip to content
Browse files

Compatiblitiy with datamapper/dm-core#119

  • Loading branch information...
1 parent d9b8008 commit f3f12dbe2f042e082676b67405c7730c44032bc0 Markus Schirp committed Jan 4, 2012
Showing with 11 additions and 13 deletions.
  1. +11 −13 spec/adapter_spec.rb
View
24 spec/adapter_spec.rb
@@ -11,45 +11,43 @@
describe 'DataMapper::Adapters::SqliteAdapter' do
- before :all do
- @adapter = DataMapper::Spec.adapter
- @repository = DataMapper.repository(@adapter.name)
- end
+ let(:adapter) { DataMapper::Spec.adapter }
+ let(:repository) { DataMapper.repository(adapter.name) }
- it_should_behave_like "An Adapter"
- it_should_behave_like "A DataObjects Adapter"
+ it_should_behave_like 'An Adapter'
+ it_should_behave_like 'A DataObjects Adapter'
- describe "with 'sqlite' as adapter name" do
+ describe 'with "sqlite" as adapter name' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite' }) }
it { subject.options[:adapter].should == 'sqlite3' }
end
- describe "with 'sqlite3' as adapter name" do
+ describe 'with "sqlite3" as adapter name' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite3' }) }
it { subject.options[:adapter].should == 'sqlite3' }
end
- describe "with 'database' given as Symbol" do
+ describe 'with "database" given as Symbol' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite', :database => :name }) }
it { subject.options[:path].should == 'name' }
end
- describe "with 'path' given as Symbol" do
+ describe 'with "path" given as Symbol' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite', :path => :name }) }
it { subject.options[:path].should == 'name' }
end
- describe "with 'database' given as String" do
+ describe 'with "database" given as String' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite', 'database' => :name }) }
it { subject.options[:path].should == 'name' }
end
- describe "with 'path' given as String" do
+ describe 'with "path" given as String' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite', 'path' => :name }) }
it { subject.options[:path].should == 'name' }
end
- describe "with blank 'path' and 'database' given as Symbol" do
+ describe 'with blank "path" and "database" given as Symbol' do
subject { DataMapper::Adapters::SqliteAdapter.new(:default, { :adapter => 'sqlite', 'path' => '', :database => :name }) }
it { subject.options[:path].should == 'name' }
end

0 comments on commit f3f12db

Please sign in to comment.
Something went wrong with that request. Please try again.