diff --git a/.rspec b/.rspec index 16f9cdb..b83d9b7 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,3 @@ --color --format documentation +--require spec_helper diff --git a/spec/database_cleaner/active_record/base_spec.rb b/spec/database_cleaner/active_record/base_spec.rb index 240fd70..56673b2 100644 --- a/spec/database_cleaner/active_record/base_spec.rb +++ b/spec/database_cleaner/active_record/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'active_record' require 'database_cleaner/active_record/base' require 'database_cleaner/shared_strategy' diff --git a/spec/database_cleaner/active_record/transaction_spec.rb b/spec/database_cleaner/active_record/transaction_spec.rb index 2816048..db7524d 100644 --- a/spec/database_cleaner/active_record/transaction_spec.rb +++ b/spec/database_cleaner/active_record/transaction_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'database_cleaner/active_record/transaction' require 'active_record' diff --git a/spec/database_cleaner/active_record/truncation/mysql2_spec.rb b/spec/database_cleaner/active_record/truncation/mysql2_spec.rb index 62355d3..306a8bb 100644 --- a/spec/database_cleaner/active_record/truncation/mysql2_spec.rb +++ b/spec/database_cleaner/active_record/truncation/mysql2_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'active_record' require 'support/active_record/mysql2_setup' require 'database_cleaner/active_record/truncation' diff --git a/spec/database_cleaner/active_record/truncation/mysql_spec.rb b/spec/database_cleaner/active_record/truncation/mysql_spec.rb index d03d00e..20e946c 100644 --- a/spec/database_cleaner/active_record/truncation/mysql_spec.rb +++ b/spec/database_cleaner/active_record/truncation/mysql_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'active_record' require 'support/active_record/mysql_setup' require 'database_cleaner/active_record/truncation' diff --git a/spec/database_cleaner/active_record/truncation/postgresql_spec.rb b/spec/database_cleaner/active_record/truncation/postgresql_spec.rb index 9ff25b9..fb495ca 100644 --- a/spec/database_cleaner/active_record/truncation/postgresql_spec.rb +++ b/spec/database_cleaner/active_record/truncation/postgresql_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'active_record' require 'support/active_record/postgresql_setup' require 'database_cleaner/active_record/truncation' diff --git a/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb b/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb index 2388f47..0bf005c 100644 --- a/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb +++ b/spec/database_cleaner/active_record/truncation/sqlite3_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'active_record' require 'support/active_record/sqlite3_setup' require 'database_cleaner/active_record/truncation' diff --git a/spec/database_cleaner/active_record/truncation_spec.rb b/spec/database_cleaner/active_record/truncation_spec.rb index b29387f..03e683c 100644 --- a/spec/database_cleaner/active_record/truncation_spec.rb +++ b/spec/database_cleaner/active_record/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'active_record' require 'active_record/connection_adapters/mysql_adapter' require 'active_record/connection_adapters/mysql2_adapter' diff --git a/spec/database_cleaner/base_spec.rb b/spec/database_cleaner/base_spec.rb index a43806a..95fcd25 100644 --- a/spec/database_cleaner/base_spec.rb +++ b/spec/database_cleaner/base_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../spec_helper' require 'database_cleaner/active_record/transaction' require 'database_cleaner/data_mapper/transaction' require 'database_cleaner/mongo_mapper/truncation' diff --git a/spec/database_cleaner/configuration_spec.rb b/spec/database_cleaner/configuration_spec.rb index ce1c6cc..2ed7ada 100644 --- a/spec/database_cleaner/configuration_spec.rb +++ b/spec/database_cleaner/configuration_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' module ArrayHelper def zipmap(array, vals) Hash[*(array.zip(vals).flatten)] diff --git a/spec/database_cleaner/couch_potato/truncation_spec.rb b/spec/database_cleaner/couch_potato/truncation_spec.rb index 1cebd87..e566a6b 100644 --- a/spec/database_cleaner/couch_potato/truncation_spec.rb +++ b/spec/database_cleaner/couch_potato/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'database_cleaner/couch_potato/truncation' require 'couch_potato' diff --git a/spec/database_cleaner/data_mapper/base_spec.rb b/spec/database_cleaner/data_mapper/base_spec.rb index fc7de3a..61b819d 100644 --- a/spec/database_cleaner/data_mapper/base_spec.rb +++ b/spec/database_cleaner/data_mapper/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/data_mapper/base' require 'database_cleaner/shared_strategy' diff --git a/spec/database_cleaner/data_mapper/transaction_spec.rb b/spec/database_cleaner/data_mapper/transaction_spec.rb index e4c1a97..a7350e2 100644 --- a/spec/database_cleaner/data_mapper/transaction_spec.rb +++ b/spec/database_cleaner/data_mapper/transaction_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'database_cleaner/data_mapper/transaction' require 'database_cleaner/shared_strategy' #require 'data_mapper' diff --git a/spec/database_cleaner/data_mapper/truncation/sqlite3_spec.rb b/spec/database_cleaner/data_mapper/truncation/sqlite3_spec.rb index bee8dae..0dc8c98 100644 --- a/spec/database_cleaner/data_mapper/truncation/sqlite3_spec.rb +++ b/spec/database_cleaner/data_mapper/truncation/sqlite3_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'dm-core' require 'dm-sqlite-adapter' require 'support/data_mapper/sqlite3_setup' diff --git a/spec/database_cleaner/generic/base_spec.rb b/spec/database_cleaner/generic/base_spec.rb index 57f7bdf..61aa98b 100644 --- a/spec/database_cleaner/generic/base_spec.rb +++ b/spec/database_cleaner/generic/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/shared_strategy' require 'database_cleaner/generic/base' require 'active_record' diff --git a/spec/database_cleaner/generic/truncation_spec.rb b/spec/database_cleaner/generic/truncation_spec.rb index 60cfe6e..d155a9d 100644 --- a/spec/database_cleaner/generic/truncation_spec.rb +++ b/spec/database_cleaner/generic/truncation_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/generic/truncation' module ::DatabaseCleaner diff --git a/spec/database_cleaner/mongo/truncation_spec.rb b/spec/database_cleaner/mongo/truncation_spec.rb index 5cef370..9cb1d3e 100644 --- a/spec/database_cleaner/mongo/truncation_spec.rb +++ b/spec/database_cleaner/mongo/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'mongo' require 'database_cleaner/mongo/truncation' require File.dirname(__FILE__) + '/mongo_examples' diff --git a/spec/database_cleaner/mongo_mapper/base_spec.rb b/spec/database_cleaner/mongo_mapper/base_spec.rb index aa8735e..03a93ad 100644 --- a/spec/database_cleaner/mongo_mapper/base_spec.rb +++ b/spec/database_cleaner/mongo_mapper/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/mongo_mapper/base' require 'database_cleaner/shared_strategy' diff --git a/spec/database_cleaner/mongo_mapper/truncation_spec.rb b/spec/database_cleaner/mongo_mapper/truncation_spec.rb index 7e8030a..e59c147 100644 --- a/spec/database_cleaner/mongo_mapper/truncation_spec.rb +++ b/spec/database_cleaner/mongo_mapper/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'mongo_mapper' require 'database_cleaner/mongo_mapper/truncation' require File.dirname(__FILE__) + '/mongo_examples' diff --git a/spec/database_cleaner/moped/truncation_spec.rb b/spec/database_cleaner/moped/truncation_spec.rb index 3c07977..98dbd4e 100644 --- a/spec/database_cleaner/moped/truncation_spec.rb +++ b/spec/database_cleaner/moped/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'moped' require 'database_cleaner/moped/truncation' require File.dirname(__FILE__) + '/moped_examples' diff --git a/spec/database_cleaner/neo4j/base_spec.rb b/spec/database_cleaner/neo4j/base_spec.rb index b7502dd..4d0c97c 100644 --- a/spec/database_cleaner/neo4j/base_spec.rb +++ b/spec/database_cleaner/neo4j/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/neo4j/base' require 'database_cleaner/shared_strategy' diff --git a/spec/database_cleaner/neo4j/transaction_spec.rb b/spec/database_cleaner/neo4j/transaction_spec.rb index 95eb806..e567f13 100644 --- a/spec/database_cleaner/neo4j/transaction_spec.rb +++ b/spec/database_cleaner/neo4j/transaction_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'neo4j-core' require 'database_cleaner/neo4j/transaction' diff --git a/spec/database_cleaner/null_strategy_spec.rb b/spec/database_cleaner/null_strategy_spec.rb index 7fb9332..9ad974b 100644 --- a/spec/database_cleaner/null_strategy_spec.rb +++ b/spec/database_cleaner/null_strategy_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require "database_cleaner/null_strategy" module DatabaseCleaner describe NullStrategy do diff --git a/spec/database_cleaner/ohm/truncation_spec.rb b/spec/database_cleaner/ohm/truncation_spec.rb index 8530a12..7ec4ebd 100644 --- a/spec/database_cleaner/ohm/truncation_spec.rb +++ b/spec/database_cleaner/ohm/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'ohm' require 'database_cleaner/ohm/truncation' diff --git a/spec/database_cleaner/redis/base_spec.rb b/spec/database_cleaner/redis/base_spec.rb index dafe8da..81f90c2 100644 --- a/spec/database_cleaner/redis/base_spec.rb +++ b/spec/database_cleaner/redis/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'redis' require 'database_cleaner/redis/base' require 'database_cleaner/shared_strategy' diff --git a/spec/database_cleaner/redis/truncation_spec.rb b/spec/database_cleaner/redis/truncation_spec.rb index 0e7bfb7..9899e9d 100644 --- a/spec/database_cleaner/redis/truncation_spec.rb +++ b/spec/database_cleaner/redis/truncation_spec.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/../../spec_helper' require 'redis' require 'database_cleaner/redis/truncation' diff --git a/spec/database_cleaner/safeguard_spec.rb b/spec/database_cleaner/safeguard_spec.rb index fa280a8..911b377 100644 --- a/spec/database_cleaner/safeguard_spec.rb +++ b/spec/database_cleaner/safeguard_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'active_record' require 'database_cleaner/active_record/transaction' diff --git a/spec/database_cleaner/sequel/base_spec.rb b/spec/database_cleaner/sequel/base_spec.rb index 9ebc53b..b2b3b73 100644 --- a/spec/database_cleaner/sequel/base_spec.rb +++ b/spec/database_cleaner/sequel/base_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/sequel/base' require 'database_cleaner/shared_strategy' require 'sequel' diff --git a/spec/database_cleaner/sequel/deletion_spec.rb b/spec/database_cleaner/sequel/deletion_spec.rb index 27f9f7c..08cfade 100644 --- a/spec/database_cleaner/sequel/deletion_spec.rb +++ b/spec/database_cleaner/sequel/deletion_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/sequel/deletion' require 'database_cleaner/shared_strategy' require 'sequel' diff --git a/spec/database_cleaner/sequel/transaction_spec.rb b/spec/database_cleaner/sequel/transaction_spec.rb index 794481e..85636ac 100644 --- a/spec/database_cleaner/sequel/transaction_spec.rb +++ b/spec/database_cleaner/sequel/transaction_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/sequel/transaction' require 'database_cleaner/shared_strategy' require 'sequel' diff --git a/spec/database_cleaner/sequel/truncation_spec.rb b/spec/database_cleaner/sequel/truncation_spec.rb index 1845569..975a42e 100644 --- a/spec/database_cleaner/sequel/truncation_spec.rb +++ b/spec/database_cleaner/sequel/truncation_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'database_cleaner/sequel/truncation' require 'database_cleaner/shared_strategy' require 'sequel' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6d6f2da..c0ccf24 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,17 +1,4 @@ -require "rubygems" - -require "bundler" -Bundler.setup - -require 'rspec/core' -require 'rspec/mocks' - -#require 'active_record' -#require 'mongo_mapper' - -$:.unshift(File.dirname(__FILE__)) -$:.unshift(File.dirname(__FILE__) + '/../lib') - +require "bundler/setup" require 'database_cleaner' RSpec.configure do |config|