Sha256: faf9670957585e5b4de643efbeb221e8e07518eb62811302400e4b243722851d

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

require 'rubygems'
require 'bundler/setup'
require_relative '../lib/ruby-pg-extras'

pg_version = ENV["PG_VERSION"]

port = if pg_version == "11"
  "5432"
elsif pg_version == "12"
  "5433"
elsif pg_version == "13"
  "5434"
else
  "5432"
end

ENV["DATABASE_URL"] ||= "postgresql://postgres:secret@localhost:#{port}/ruby-pg-extras-test"

RSpec.configure do |config|
  config.before(:suite) do
    RubyPgExtras.connection.exec("CREATE EXTENSION IF NOT EXISTS pg_stat_statements;")
    RubyPgExtras.connection.exec("CREATE EXTENSION IF NOT EXISTS pg_buffercache;")
    RubyPgExtras.connection.exec("CREATE EXTENSION IF NOT EXISTS sslinfo;")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-pg-extras-4.5.1 spec/spec_helper.rb
ruby-pg-extras-4.5.0 spec/spec_helper.rb
ruby-pg-extras-4.4.4 spec/spec_helper.rb
ruby-pg-extras-4.4.3 spec/spec_helper.rb
ruby-pg-extras-4.4.2 spec/spec_helper.rb
ruby-pg-extras-4.4.1 spec/spec_helper.rb
ruby-pg-extras-4.4.0 spec/spec_helper.rb