diff options
author | Lars Kanis <kanis@comcard.de> | 2017-03-22 11:10:03 +0100 |
---|---|---|
committer | Lars Kanis <kanis@comcard.de> | 2017-03-22 12:52:09 +0100 |
commit | f28a331023fab241f694c53802b45fb2d66c2c4f (patch) | |
tree | 185a501f3d3bbef86e88b4fae2a1454176c5f8e1 /activerecord/test | |
parent | 34fe2a4fc778d18b7fe6bdf3629c1481bee789b9 (diff) | |
download | rails-f28a331023fab241f694c53802b45fb2d66c2c4f.tar.gz rails-f28a331023fab241f694c53802b45fb2d66c2c4f.tar.bz2 rails-f28a331023fab241f694c53802b45fb2d66c2c4f.zip |
[PostgreSQL]: Replace deprecated PG constants.
The old top level classes PGconn, PGresult and PGError were deprecated
since pg-0.13.0: https://github.com/ged/ruby-pg/blob/master/History.rdoc#v0130-2012-02-09-michael-granger-gedfaeriemudorg
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/statement_pool_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb b/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb index eb9978a898..146b619a4b 100644 --- a/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb +++ b/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb @@ -3,13 +3,13 @@ require "cases/helper" module ActiveRecord module ConnectionAdapters class PostgreSQLAdapter < AbstractAdapter - class InactivePGconn + class InactivePgConnection def query(*args) - raise PGError + raise PG::Error end def status - PGconn::CONNECTION_BAD + PG::CONNECTION_BAD end end @@ -31,7 +31,7 @@ module ActiveRecord end def test_dealloc_does_not_raise_on_inactive_connection - cache = StatementPool.new InactivePGconn.new, 10 + cache = StatementPool.new InactivePgConnection.new, 10 cache["foo"] = "bar" assert_nothing_raised { cache.clear } end |