diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 18:14:09 -0500 |
---|---|---|
committer | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 23:32:59 -0500 |
commit | 94333a4c31bd10c1f358c538a167e6a4589bae2d (patch) | |
tree | 9106c349180bbdcba2e7839e0e79144e3a15a055 /activerecord/test/cases/adapters/postgresql/connection_test.rb | |
parent | 211adb47e76b358ea15a3f756431c042ab231c23 (diff) | |
download | rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.gz rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.bz2 rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.zip |
Use assert_predicate and assert_not_predicate
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/connection_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/connection_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb index 81358b8fc4..d1b3c434e1 100644 --- a/activerecord/test/cases/adapters/postgresql/connection_test.rb +++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb @@ -157,7 +157,7 @@ module ActiveRecord original_connection_pid = @connection.query("select pg_backend_pid()") # Sanity check. - assert @connection.active? + assert_predicate @connection, :active? if @connection.send(:postgresql_version) >= 90200 secondary_connection = ActiveRecord::Base.connection_pool.checkout @@ -176,7 +176,7 @@ module ActiveRecord @connection.verify! - assert @connection.active? + assert_predicate @connection, :active? # If we get no exception here, then either we re-connected successfully, or # we never actually got disconnected. |