diff options
Diffstat (limited to 'activerecord/test/cases/connection_adapters')
-rw-r--r-- | activerecord/test/cases/connection_adapters/adapter_leasing_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/connection_adapters/connection_handler_test.rb | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb b/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb index 82c6cf8dea..72838ff56b 100644 --- a/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb +++ b/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb @@ -45,11 +45,11 @@ module ActiveRecord # Make sure the pool marks the connection in use assert_equal @adapter, pool.connection - assert @adapter.in_use? + assert_predicate @adapter, :in_use? # Close should put the adapter back in the pool @adapter.close - assert_not @adapter.in_use? + assert_not_predicate @adapter, :in_use? assert_equal @adapter, pool.connection end diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb index d4b299e330..f4cc251fb9 100644 --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb @@ -103,11 +103,11 @@ module ActiveRecord end def test_active_connections? - assert !@handler.active_connections? + assert_not_predicate @handler, :active_connections? assert @handler.retrieve_connection(@spec_name) - assert @handler.active_connections? + assert_predicate @handler, :active_connections? @handler.clear_active_connections! - assert !@handler.active_connections? + assert_not_predicate @handler, :active_connections? end def test_retrieve_connection_pool @@ -146,7 +146,7 @@ module ActiveRecord def test_forked_child_doesnt_mangle_parent_connection object_id = ActiveRecord::Base.connection.object_id - assert ActiveRecord::Base.connection.active? + assert_predicate ActiveRecord::Base.connection, :active? rd, wr = IO.pipe rd.binmode @@ -174,7 +174,7 @@ module ActiveRecord unless in_memory_db? def test_forked_child_recovers_from_disconnected_parent object_id = ActiveRecord::Base.connection.object_id - assert ActiveRecord::Base.connection.active? + assert_predicate ActiveRecord::Base.connection, :active? rd, wr = IO.pipe rd.binmode |