Sha256: 70bccc399c21172a4272d4f7a081178ad0940f39d3d5651a9ff19fc819f1513d

Contents?: true

Size: 743 Bytes

Versions: 6

Compression:

Stored size: 743 Bytes

Contents

#!/usr/bin/env rspec
# encoding: utf-8

require_relative 'helpers'

require 'pg'

describe PG do

	it "knows what version of the libpq library is loaded", :postgresql_91 do
		expect( PG.library_version ).to be_an( Integer )
		expect( PG.library_version ).to be >= 90100
	end


	it "knows whether or not the library is threadsafe" do
		expect( PG ).to be_threadsafe()
	end

	it "does have hierarchical error classes" do
		expect( PG::UndefinedTable.ancestors[0,4] ).to eq([
				PG::UndefinedTable,
				PG::SyntaxErrorOrAccessRuleViolation,
				PG::ServerError,
		        PG::Error
		        ])

		expect( PG::InvalidSchemaName.ancestors[0,3] ).to eq([
				PG::InvalidSchemaName,
				PG::ServerError,
		        PG::Error
		        ])
	end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pg-0.18.0.pre20141017160319-x86-mingw32 spec/pg_spec.rb
pg-0.18.0.pre20141017160319-x64-mingw32 spec/pg_spec.rb
pg-0.18.0.pre20141017160319 spec/pg_spec.rb
pg-0.18.0.pre20141017155815 spec/pg_spec.rb
pg-0.18.0.pre20140820094244 spec/pg_spec.rb
pg-0.17.2.pre.546 spec/pg_spec.rb