1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #16132 from tgxworld/fix_test_not_unsubscribing

Fix incorrect unsubscription.
This commit is contained in:
Santiago Pastorino 2014-07-11 08:14:55 -03:00
commit 6e23c8242d

View file

@ -39,11 +39,11 @@ module Rails
def setup def setup
@subscriber = Subscriber.new @subscriber = Subscriber.new
@notifier = ActiveSupport::Notifications.notifier @notifier = ActiveSupport::Notifications.notifier
notifier.subscribe 'request.action_dispatch', subscriber @subscription = notifier.subscribe 'request.action_dispatch', subscriber
end end
def teardown def teardown
notifier.unsubscribe subscriber notifier.unsubscribe @subscription
end end
def test_notification def test_notification