diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index cc9b2a45f4..c535119972 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -5,21 +5,21 @@ class ConnectionManagementTest < ActiveRecord::TestCase @env = {} @app = stub('App') @management = ActiveRecord::ConnectionAdapters::ConnectionManagement.new(@app) - + @connections_cleared = false ActiveRecord::Base.stubs(:clear_active_connections!).with { @connections_cleared = true } end - + test "clears active connections after each call" do @app.expects(:call).with(@env) @management.call(@env) assert @connections_cleared end - + test "doesn't clear active connections when running in a test case" do @env['rack.test'] = true @app.expects(:call).with(@env) @management.call(@env) assert !@connections_cleared end -end
\ No newline at end of file +end |