Sha256: 6445b8eadc1fe70dfe4f3bdda8de97ab94abb8f82b9b8788d475e24fe2c77e9d

Contents?: true

Size: 732 Bytes

Versions: 4

Compression:

Stored size: 732 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"
  elsif pg_version == "14"
    "5435"
  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

4 entries across 4 versions & 2 rubygems

Version Path
ruby-pg-extras-5.4.0 spec/spec_helper.rb
feedback-0.0.12 spec/spec_helper.rb
feedback-0.0.11 spec/spec_helper.rb
feedback-0.0.10 spec/spec_helper.rb