Sha256: 202f2a60aa58f395a103ee84af20b8527ee4f5176595936f3e9452b0a587ca96

Contents?: true

Size: 528 Bytes

Versions: 13

Compression:

Stored size: 528 Bytes

Contents

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

ENV['RACK_ENV'] = 'test'

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

13 entries across 13 versions & 1 rubygems

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