Sha256: 5ef583ff02182f097b6991060c706e9e74a483825e6dd8eac6faa31df89631ff

Contents?: true

Size: 552 Bytes

Versions: 15

Compression:

Stored size: 552 Bytes

Contents

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

ENV['RACK_ENV'] = 'test'

require 'mongoid'
require 'database_cleaner'
require 'slack-ruby-bot-server/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

15 entries across 15 versions & 1 rubygems

Version Path
slack-ruby-bot-server-0.12.3 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.12.2 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.12.1 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.12.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.11.1 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.11.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.10.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.9.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.8.3 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.8.2 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.8.1 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.8.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.7.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.6.1 sample_apps/sample_app_mongoid/spec/spec_helper.rb
slack-ruby-bot-server-0.6.0 sample_apps/sample_app_mongoid/spec/spec_helper.rb