Sha256: f16e0a1813e2571bdaa620d0adf0dbac424a93cd76c7c093780b8e71dccf3801

Contents?: true

Size: 835 Bytes

Versions: 3

Compression:

Stored size: 835 Bytes

Contents

require 'simplecov'
SimpleCov.start

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongoid'
require 'database_cleaner'
require 'fast_stemmer'
require 'yaml'
require 'mongoid_search'
require 'mongoid-compatibility'

Mongoid.configure do |config|
  config.connect_to 'mongoid_search_test'
end

Dir["#{File.dirname(__FILE__)}/models/*.rb"].each { |file| require file }

DatabaseCleaner.orm = :mongoid

RSpec.configure do |config|
  config.before(:all) do
    Mongoid.logger.level = Logger::INFO
    Mongo::Logger.logger.level = Logger::INFO if Mongoid::Compatibility::Version.mongoid5_or_newer?
    DatabaseCleaner.strategy = :truncation
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid_search-0.4.0 spec/spec_helper.rb
mongoid_search-0.3.6 spec/spec_helper.rb
mongoid_search-0.3.5 spec/spec_helper.rb