3
class TestRecord < ActiveRecord::Base
6
class TestUnconnectedAdapter < ActiveRecord::TestCase
7
self.use_transactional_fixtures = false
10
@underlying = ActiveRecord::Base.connection
11
@specification = ActiveRecord::Base.remove_connection
16
ActiveRecord::Base.establish_connection(@specification)
19
def test_connection_no_longer_established
20
assert_raise(ActiveRecord::ConnectionNotEstablished) do
24
assert_raise(ActiveRecord::ConnectionNotEstablished) do
29
def test_underlying_adapter_no_longer_active
30
assert !@underlying.active?, "Removed adapter should no longer be active"