diff --git a/spec/database_cleaner/active_record/truncation/mysql2_spec.rb b/spec/database_cleaner/active_record/truncation/mysql2_spec.rb index 5af4715..0a36ab8 100644 --- a/spec/database_cleaner/active_record/truncation/mysql2_spec.rb +++ b/spec/database_cleaner/active_record/truncation/mysql2_spec.rb @@ -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 diff --git a/spec/database_cleaner/active_record/truncation/mysql_spec.rb b/spec/database_cleaner/active_record/truncation/mysql_spec.rb index 0508fe5..a6eb8e9 100644 --- a/spec/database_cleaner/active_record/truncation/mysql_spec.rb +++ b/spec/database_cleaner/active_record/truncation/mysql_spec.rb @@ -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 diff --git a/spec/database_cleaner/active_record/truncation/postgresql_spec.rb b/spec/database_cleaner/active_record/truncation/postgresql_spec.rb index f687a82..80a0d38 100644 --- a/spec/database_cleaner/active_record/truncation/postgresql_spec.rb +++ b/spec/database_cleaner/active_record/truncation/postgresql_spec.rb @@ -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 diff --git a/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb b/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb index d43a57f..75c212b 100644 --- a/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb +++ b/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb @@ -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