Sha256: 75339b758348a499afe0171be5a292228b3f1f8240b78d78faa1c31b057b649c

Contents?: true

Size: 554 Bytes

Versions: 4

Compression:

Stored size: 554 Bytes

Contents

require 'database_cleaner'

RSpec.configure do |config|
  config.before(:suite) do
    ActiveRecord::Base.establish_connection(
      adapter: "postgresql",
      database: ENV["POSTGRES_DB_DATABASE"] || "migration_lock_timeout_test",
      username: ENV['POSTGRES_DB_USERNAME'],
      password: ENV['POSTGRES_DB_PASSWORD'],
      host: 'localhost'
    )
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
migration-lock-timeout-1.4.0 spec_helper.rb
migration-lock-timeout-1.3.0 spec_helper.rb
migration-lock-timeout-1.2.0 spec_helper.rb
migration-lock-timeout-1.1.0 spec_helper.rb