diff options
Diffstat (limited to 'activerecord/test/cases/connection_adapters/abstract_adapter_test.rb')
-rw-r--r-- | activerecord/test/cases/connection_adapters/abstract_adapter_test.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb b/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb index ef6a57d328..b2e747c507 100644 --- a/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb +++ b/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb @@ -3,14 +3,23 @@ require "cases/helper" module ActiveRecord module ConnectionAdapters class AbstractAdapterTest < ActiveRecord::TestCase - def test_in_use? - adapter = AbstractAdapter.new nil, nil + attr_reader :adapter + + def setup + @adapter = AbstractAdapter.new nil, nil + end + def test_in_use? # FIXME: change to refute in Rails 4.0 / mt assert !adapter.in_use?, 'adapter is not in use' assert adapter.lease, 'lease adapter' assert adapter.in_use?, 'adapter is in use' end + + def test_lease_twice + assert adapter.lease, 'should lease adapter' + assert !adapter.lease, 'should not lease adapter' + end end end end |