Sha256: 2c372634ca5b72ad235f58cee2e963ce58acece6da707db99578aed8b77bfdb1

Contents?: true

Size: 587 Bytes

Versions: 3

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

$LOAD_PATH.unshift File.expand_path('..', __dir__)

ENV['RACK_ENV'] = 'test'

require 'mongoid'
require 'database_cleaner'
require 'slack-ruby-bot-server-rtm/rspec'

Mongoid.load!(File.expand_path('../config/mongoid.yml', __dir__), ENV['RACK_ENV'])

RSpec.configure do |config|
  config.before :suite do
    Mongo::Logger.logger.level = Logger::INFO

    Mongoid::Tasks::Database.create_indexes
  end

  config.after :suite do
    Mongoid.purge!
  end

  config.around :each do |example|
    DatabaseCleaner.cleaning do
      example.run
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-ruby-bot-server-rtm-0.2.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-rtm-0.1.1 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-rtm-0.1.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb