Sha256: 43f8ca3676c3f4a22aa014998b8f8f01d34bce75105853a935267971cb73fa49

Contents?: true

Size: 507 Bytes

Versions: 7

Compression:

Stored size: 507 Bytes

Contents

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

ENV['RACK_ENV'] = 'test'

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

7 entries across 7 versions & 1 rubygems

Version Path
slack-ruby-bot-server-0.5.0 sample_app/spec/spec_helper.rb
slack-ruby-bot-server-0.4.0 sample_app/spec/spec_helper.rb
slack-ruby-bot-server-0.3.1 sample_app/spec/spec_helper.rb
slack-ruby-bot-server-0.3.0 sample_app/spec/spec_helper.rb
slack-ruby-bot-server-0.2.0 sample_app/spec/spec_helper.rb
slack-ruby-bot-server-0.1.1 sample_app/spec/spec_helper.rb
slack-ruby-bot-server-0.1.0 sample_app/spec/spec_helper.rb