Sha256: 6b3967d7482b53e7b008eb5a27508ba9b7a4d5d6ae9af8371a672e36e1ca6850

Contents?: true

Size: 943 Bytes

Versions: 4

Compression:

Stored size: 943 Bytes

Contents

# require 'codeclimate-test-reporter'
# CodeClimate::TestReporter.start
if ENV['CI']
  require 'coveralls'
  Coveralls.wear!
end

$LOAD_PATH << File.expand_path('../../lib', __FILE__)

# require 'pry'
# require 'database_cleaner'
require 'mongoid'
require 'mongoid-rspec'

require 'mongoid/urls'

ENV['MONGOID_ENV'] = 'test'

db_config = {
  default: {
    database: 'mongoid_urls_test',
    hosts: ["localhost: #{ENV['MONGODB_PORT'] || 27_017}"],
    options: {}
  }
}

Mongoid.configure do |config|
  config.load_configuration(
    if Mongoid::VERSION >= '5'
      { clients: db_config }
    else
      { sessions: db_config }
    end
  )
end

require 'support/models'

Mongo::Logger.logger.level = Logger::INFO if Mongoid::VERSION >= '5'

RSpec.configure do |config|
  config.include Mongoid::Matchers

  config.before(:each) do
    Mongoid.purge!
  end

  config.after(:suite) do
    puts "\n# With Mongoid v#{Mongoid::VERSION}"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-urls-0.5.0 spec/spec_helper.rb
mongoid-urls-0.3.0 spec/spec_helper.rb
mongoid-urls-0.0.9 spec/spec_helper.rb
mongoid-urls-0.0.7 spec/spec_helper.rb