blob: b2e747c50789667dbb1a5a293a27bc3d84d8e877 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
require "cases/helper"
module ActiveRecord
module ConnectionAdapters
class AbstractAdapterTest < ActiveRecord::TestCase
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
|