Sha256: b63c01181e706f93e66a989cc1306dc4dd457069fe99da47c6be4f8cfe302202

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'rspec'

require 'mongoid'
require 'database_cleaner'

ENV['MONGOID_ENV'] = 'test'

require File.expand_path('../lib/mongoid_fulltext', __dir__)

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

DatabaseCleaner.orm = :mongoid
DatabaseCleaner.strategy = :truncation

Mongoid.logger.level = Logger::INFO
Mongo::Logger.logger.level = Logger::INFO if Mongoid::Compatibility::Version.mongoid5_or_newer?

Mongoid.configure do |config|
  config.connect_to('mongoid_fulltext_test')
end

RSpec.configure do |c|
  c.before :each do
    DatabaseCleaner.clean
  end
  c.after :all do
    DatabaseCleaner.clean
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid_fulltext-0.8.2 spec/spec_helper.rb