Sha256: 1800a62a42fa3dec303acacc0f2714b40cfcd2f8819db0383c0a52159a8ee3a1

Contents?: true

Size: 846 Bytes

Versions: 15

Compression:

Stored size: 846 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyPgExtras do
  RubyPgExtras::QUERIES.each do |query_name|
    it "#{query_name} description can be read" do
      expect do
        RubyPgExtras.description_for(
          query_name: query_name
        )
      end.not_to raise_error
    end
  end

  RubyPgExtras::QUERIES.reject { |q| q == :kill_all }.each do |query_name|
    it "#{query_name} query can be executed" do
      expect do
        RubyPgExtras.run_query(
          query_name: query_name,
          in_format: :hash
        )
      end.not_to raise_error
    end
  end

  describe "#database_url=" do
    it "setting custom database URL works" do
      RubyPgExtras.database_url = ENV.fetch("DATABASE_URL")
      expect do
        RubyPgExtras.bloat(in_format: :hash)
      end.not_to raise_error
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ruby-pg-extras-5.3.1 spec/smoke_spec.rb
ruby-pg-extras-5.3.0 spec/smoke_spec.rb
ruby-pg-extras-5.2.5 spec/smoke_spec.rb
ruby-pg-extras-5.2.4 spec/smoke_spec.rb
ruby-pg-extras-5.2.3 spec/smoke_spec.rb
ruby-pg-extras-5.2.2 spec/smoke_spec.rb
ruby-pg-extras-5.2.1 spec/smoke_spec.rb
ruby-pg-extras-5.2.0 spec/smoke_spec.rb
ruby-pg-extras-5.1.0 spec/smoke_spec.rb
ruby-pg-extras-5.0.0 spec/smoke_spec.rb
ruby-pg-extras-4.13.0 spec/smoke_spec.rb
ruby-pg-extras-4.12.2 spec/smoke_spec.rb
ruby-pg-extras-4.12.1 spec/smoke_spec.rb
ruby-pg-extras-4.12.0 spec/smoke_spec.rb
ruby-pg-extras-4.11.0 spec/smoke_spec.rb