Methods
Instance Public methods
test_subscribed()
Link
# File activesupport/test/notifications_test.rb, line 28 def test_subscribed name = "foo" name2 = name * 2 expected = [name, name] events = [] callback = lambda {|*_| events << _.first} ActiveSupport::Notifications.subscribed(callback, name) do ActiveSupport::Notifications.instrument(name) ActiveSupport::Notifications.instrument(name2) ActiveSupport::Notifications.instrument(name) end assert_equal expected, events ActiveSupport::Notifications.instrument(name) assert_equal expected, events end