Sha256: af08fa30f37d24448514290ebc5d00ed30702aa948eb4af64cf27e5a57096dd6
Contents?: true
Size: 563 Bytes
Versions: 3
Compression:
Stored size: 563 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('..', __dir__) ENV['RACK_ENV'] = 'test' require 'active_record' require 'database_cleaner' require 'slack-ruby-bot-server-rtm/rspec' db_config = YAML.safe_load(File.read(File.expand_path('../config/postgresql.yml', __dir__)), [], [], true)[ENV['RACK_ENV']] ActiveRecord::Tasks::DatabaseTasks.create(db_config) ActiveRecord::Base.establish_connection(db_config) RSpec.configure do |config| config.around :each do |example| DatabaseCleaner.cleaning do example.run end end end
Version data entries
3 entries across 3 versions & 1 rubygems