Merge branch 'master' into pre_count_on_sequel

This commit is contained in:
Kostas Karachalios 2014-12-05 12:51:53 +01:00
commit 4b8742259e
6 changed files with 7 additions and 102 deletions

View File

@ -44,95 +44,6 @@ GEM
couchrest (1.2.0)
mime-types (~> 1.15)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0)
rest-client (~> 1.6.1)
cucumber (1.2.1)
builder (>= 2.1.2)

View File

@ -3,7 +3,9 @@ require 'active_record/base'
require 'active_record/connection_adapters/abstract_adapter'
#Load available connection adapters
%w( abstract_mysql_adapter postgresql_adapter sqlite3_adapter ).each do |known_adapter|
%w(
abstract_mysql_adapter postgresql_adapter sqlite3_adapter mysql_adapter mysql2_adapter
).each do |known_adapter|
begin
require "active_record/connection_adapters/#{known_adapter}"
rescue LoadError
@ -185,6 +187,7 @@ module ActiveRecord
end
AbstractMysqlAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(AbstractMysqlAdapter)
Mysql2Adapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(Mysql2Adapter)
MysqlAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(MysqlAdapter)
SQLiteAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::SQLiteAdapter } if defined?(SQLiteAdapter)
SQLite3Adapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::SQLiteAdapter } if defined?(SQLite3Adapter)
PostgreSQLAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::PostgreSQLAdapter } if defined?(PostgreSQLAdapter)

View File

@ -6,10 +6,9 @@ require 'database_cleaner/active_record/truncation/shared_fast_truncation'
module ActiveRecord
module ConnectionAdapters
describe do
describe do
before(:all) { active_record_mysql2_setup }
let(:adapter) { Mysql2Adapter }
let(:connection) { active_record_mysql2_connection }
describe "#truncate_table" do
@ -31,7 +30,6 @@ module ActiveRecord
end
it_behaves_like "an adapter with pre-count truncation" do
let(:adapter) { Mysql2Adapter }
let(:connection) { active_record_mysql2_connection }
end
end

View File

@ -6,10 +6,9 @@ require 'database_cleaner/active_record/truncation/shared_fast_truncation'
module ActiveRecord
module ConnectionAdapters
describe do
describe do
before(:all) { active_record_mysql_setup }
let(:adapter) { MysqlAdapter }
let(:connection) { active_record_mysql_connection }
describe "#truncate_table" do
@ -29,9 +28,8 @@ module ActiveRecord
User.create.id.should eq 1
end
end
it_behaves_like "an adapter with pre-count truncation" do
let(:adapter) { MysqlAdapter }
let(:connection) { active_record_mysql_connection }
end
end

View File

@ -9,8 +9,6 @@ module ActiveRecord
describe do
before(:all) { active_record_pg_setup }
let(:adapter) { PostgreSQLAdapter }
let(:connection) do
active_record_pg_connection
end
@ -38,7 +36,6 @@ module ActiveRecord
end
it_behaves_like "an adapter with pre-count truncation" do
let(:adapter) { PostgreSQLAdapter }
let(:connection) { active_record_pg_connection }
end

View File

@ -8,8 +8,6 @@ module ActiveRecord
describe do
before(:all) { active_record_sqlite3_setup }
let(:adapter) { SQLite3Adapter }
let(:connection) do
active_record_sqlite3_connection
end