Sha256: 70ca877fd3eb73cfc1e1ab5f76dac637b8f280c66fd42ad1572f4961c1c85ea0

Contents?: true

Size: 547 Bytes

Versions: 33

Compression:

Stored size: 547 Bytes

Contents

# -*- rspec -*-
# encoding: utf-8

require_relative '../helpers'

require 'pg'


describe PG::TypeMap do
	let!(:tm){ PG::TypeMap.new }

	it "should raise an error when used for param type casts" do
		expect{
			@conn.exec_params( "SELECT $1", [5], 0, tm )
		}.to raise_error(NotImplementedError, /not suitable to map query params/)
	end

	it "should raise an error when used for result type casts" do
		res = @conn.exec( "SELECT 1" )
		expect{ res.map_types!(tm) }.to raise_error(NotImplementedError, /not suitable to map result values/)
	end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pg-1.2.3-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.2.3-x64-mingw32 spec/pg/type_map_spec.rb
pg-1.2.3 spec/pg/type_map_spec.rb
pg-1.2.2-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.2.2-x64-mingw32 spec/pg/type_map_spec.rb
pg-1.2.2 spec/pg/type_map_spec.rb
pg-1.2.1-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.2.1-x64-mingw32 spec/pg/type_map_spec.rb
pg-1.2.1 spec/pg/type_map_spec.rb
pg-1.2.0-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.2.0-x64-mingw32 spec/pg/type_map_spec.rb
pg-1.2.0 spec/pg/type_map_spec.rb
pg-1.1.4-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.1.4-x64-mingw32 spec/pg/type_map_spec.rb
pg-1.1.4 spec/pg/type_map_spec.rb
pg-1.1.3-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.1.3-x64-mingw32 spec/pg/type_map_spec.rb
pg-1.1.3 spec/pg/type_map_spec.rb
pg-1.1.2-x86-mingw32 spec/pg/type_map_spec.rb
pg-1.1.2-x64-mingw32 spec/pg/type_map_spec.rb