Sha256: 4bacada371830719da4b155f3403c2d69b88c20f43a292968ff033aad30de838

Contents?: true

Size: 747 Bytes

Versions: 33

Compression:

Stored size: 747 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyPgExtras::DiagnosePrint do
  subject(:print_result) do
    RubyPgExtras::DiagnosePrint.call(data)
  end

  let(:data) do
    [
      {
        :check_name => :table_cache_hit,
        :ok => false,
        :message => "Table hit ratio too low: 0.906977."
      },
      {
        :check_name => :index_cache_hit,
        :ok => false,
        :message => "Index hit ratio is too low: 0.818182."
      },
      {
        :check_name => :ssl_used,
        :ok => true,
        :message => "Database client is using a secure SSL connection."
      }
    ]
  end

  describe "call" do
    it "works" do
      expect {
        print_result
      }.not_to raise_error
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
ruby-pg-extras-5.3.1 spec/diagnose_print_spec.rb
ruby-pg-extras-5.3.0 spec/diagnose_print_spec.rb
ruby-pg-extras-5.2.5 spec/diagnose_print_spec.rb
ruby-pg-extras-5.2.4 spec/diagnose_print_spec.rb
ruby-pg-extras-5.2.3 spec/diagnose_print_spec.rb
ruby-pg-extras-5.2.2 spec/diagnose_print_spec.rb
ruby-pg-extras-5.2.1 spec/diagnose_print_spec.rb
ruby-pg-extras-5.2.0 spec/diagnose_print_spec.rb
ruby-pg-extras-5.1.0 spec/diagnose_print_spec.rb
ruby-pg-extras-5.0.0 spec/diagnose_print_spec.rb
ruby-pg-extras-4.13.0 spec/diagnose_print_spec.rb
ruby-pg-extras-4.12.2 spec/diagnose_print_spec.rb
ruby-pg-extras-4.12.1 spec/diagnose_print_spec.rb
ruby-pg-extras-4.12.0 spec/diagnose_print_spec.rb
ruby-pg-extras-4.11.0 spec/diagnose_print_spec.rb
ruby-pg-extras-4.10.0 spec/diagnose_print_spec.rb
ruby-pg-extras-4.9.0 spec/diagnose_print_spec.rb
ruby-pg-extras-4.8.1 spec/diagnose_print_spec.rb
ruby-pg-extras-4.7.2 spec/diagnose_print_spec.rb
ruby-pg-extras-4.7.1 spec/diagnose_print_spec.rb