aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/connection_test.rb
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2014-03-28 18:54:35 -0700
committerGuo Xiang Tan <tgx_world@hotmail.com>2014-03-28 18:56:40 -0700
commit0212a41700a4e9cd0a6eb2a0811608ea13f8c5b3 (patch)
tree6f4c4e477bf4e346dd43bffda0658fcd0896a920 /activerecord/test/cases/adapters/postgresql/connection_test.rb
parent74d7df175c83e73347114c004ff861aec0572928 (diff)
downloadrails-0212a41700a4e9cd0a6eb2a0811608ea13f8c5b3.tar.gz
rails-0212a41700a4e9cd0a6eb2a0811608ea13f8c5b3.tar.bz2
rails-0212a41700a4e9cd0a6eb2a0811608ea13f8c5b3.zip
Fix tests not unsubscribing from Notifications.
See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/connection_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/connection_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb
index aa4996133f..514ae20e3c 100644
--- a/activerecord/test/cases/adapters/postgresql/connection_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb
@@ -8,12 +8,12 @@ module ActiveRecord
def setup
super
@subscriber = SQLSubscriber.new
- ActiveSupport::Notifications.subscribe('sql.active_record', @subscriber)
+ @subscription = ActiveSupport::Notifications.subscribe('sql.active_record', @subscriber)
@connection = ActiveRecord::Base.connection
end
def teardown
- ActiveSupport::Notifications.unsubscribe(@subscriber)
+ ActiveSupport::Notifications.unsubscribe(@subscription)
super
end