spec/helper.rb in plucky-0.6.2 vs spec/helper.rb in plucky-0.6.3

- old
+ new

@@ -15,28 +15,28 @@ FileUtils.mkdir_p(log_dir) Log = Logger.new(File.join(log_dir, 'test.log')) LogBuddy.init :logger => Log -connection = Mongo::Connection.new('127.0.0.1', 27017, :logger => Log) +connection = Mongo::MongoClient.new('127.0.0.1', 27017, :logger => Log) DB = connection.db('test') RSpec.configure do |config| config.filter_run :focused => true config.alias_example_to :fit, :focused => true config.alias_example_to :xit, :pending => true config.run_all_when_everything_filtered = true config.before(:suite) do - DB.collections.map do |collection| - collection.drop_indexes - end + DB.collections.reject { |collection| + collection.name =~ /system\./ + }.map(&:drop_indexes) end config.before(:each) do - DB.collections.map do |collection| - collection.remove - end + DB.collections.reject { |collection| + collection.name =~ /system\./ + }.map(&:remove) end end operators = %w{gt lt gte lte ne in nin mod all size exists} operators.delete('size') if RUBY_VERSION >= '1.9.1'