Merge pull request #67 from mildmojo/fix_sqlite3_adapter_spelling

Fix case-sensitive SQLite3 adapter name typos.
This commit is contained in:
Zach Dennis 2012-10-01 06:44:46 -07:00
commit ee5604d4d5
3 changed files with 13 additions and 3 deletions

View file

@ -1,7 +1,7 @@
require "active_record/connection_adapters/sqlite3_adapter" require "active_record/connection_adapters/sqlite3_adapter"
require "activerecord-import/adapters/sqlite3_adapter" require "activerecord-import/adapters/sqlite3_adapter"
class ActiveRecord::ConnectionAdapters::Sqlite3Adapter class ActiveRecord::ConnectionAdapters::SQLite3Adapter
include ActiveRecord::Import::Sqlite3Adapter include ActiveRecord::Import::SQLite3Adapter
end end

View file

@ -1,4 +1,4 @@
module ActiveRecord::Import::Sqlite3Adapter module ActiveRecord::Import::SQLite3Adapter
def next_value_for_sequence(sequence_name) def next_value_for_sequence(sequence_name)
%{nextval('#{sequence_name}')} %{nextval('#{sequence_name}')}
end end

View file

@ -50,3 +50,13 @@ describe "ActiveRecord::ConnectionAdapter::AbstractAdapter" do
end end
end end
describe "ActiveRecord::Import DB-specific adapter class" do
context "when ActiveRecord::Import is in use" do
it "should appear in the AR connection adapter class's ancestors" do
connection = ActiveRecord::Base.connection
import_class_name = 'ActiveRecord::Import::' + connection.class.name.demodulize
assert_include connection.class.ancestors, import_class_name.constantize
end
end
end