Sha256: afccf7ad646a81728239ae6e844f068391c75106ef05e7a355c2dbd0638acc95

Contents?: true

Size: 664 Bytes

Versions: 6

Compression:

Stored size: 664 Bytes

Contents

$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'

Mongoid.configure do |config|
  name = "mongoid_search_test"
  config.master = Mongo::Connection.new.db(name)
end

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

DatabaseCleaner.orm = :mongoid

RSpec.configure do |config|
  config.before(:all) do
    DatabaseCleaner.strategy = :truncation
  end

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongoid_search-0.2.6 spec/spec_helper.rb
mongoid_search-0.2.5 spec/spec_helper.rb
mongoid_search-0.2.4 spec/spec_helper.rb
mongoid_search-0.2.3 spec/spec_helper.rb
mongoid_search-0.2.1 spec/spec_helper.rb
mongoid_search-0.2.0 spec/spec_helper.rb