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:
commit
6e23c8242d
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue