Sha256: 23b548df0a331c9d1af6f5397d0f0bdccdfe9aa4a12c24f284579e9a2b4d7326

Contents?: true

Size: 1022 Bytes

Versions: 3

Compression:

Stored size: 1022 Bytes

Contents

$:.unshift(File.expand_path('../../lib', __FILE__))

require 'rubygems'
require 'bundler'

Bundler.require(:default, :test)

require 'plucky'

require 'fileutils'
require 'logger'
require 'pp'

log_dir = File.expand_path('../../log', __FILE__)
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)
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
  end

  config.before(:each) do
    DB.collections.map do |collection|
      collection.remove
    end
  end
end

operators = %w{gt lt gte lte ne in nin mod all size exists}
operators.delete('size') if RUBY_VERSION >= '1.9.1'
SymbolOperators = operators

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
plucky-0.6.2 spec/helper.rb
plucky-0.6.1 spec/helper.rb
plucky-0.6.0 spec/helper.rb