Methods
- T
Instance Public methods
test_unsubscribing_by_name_leaves_the_other_subscriptions()
Link
# File activesupport/test/notifications_test.rb, line 68 def test_unsubscribing_by_name_leaves_the_other_subscriptions @notifier.publish "named.subscription", :foo @notifier.wait assert_equal [["named.subscription", :foo]], @events @notifier.unsubscribe("named.subscription") @notifier.publish "named.subscription", :foo @notifier.wait assert_equal [["named.subscription", :foo], ["named.subscription", :foo]], @events end
test_unsubscribing_by_name_removes_a_subscription()
Link
# File activesupport/test/notifications_test.rb, line 58 def test_unsubscribing_by_name_removes_a_subscription @notifier.publish "named.subscription", :foo @notifier.wait assert_equal [["named.subscription", :foo]], @named_events @notifier.unsubscribe("named.subscription") @notifier.publish "named.subscription", :foo @notifier.wait assert_equal [["named.subscription", :foo]], @named_events end
test_unsubscribing_removes_a_subscription()
Link
# File activesupport/test/notifications_test.rb, line 48 def test_unsubscribing_removes_a_subscription @notifier.publish :foo @notifier.wait assert_equal [[:foo]], @events @notifier.unsubscribe(@subscription) @notifier.publish :foo @notifier.wait assert_equal [[:foo]], @events end