class Notifications::TestCase
Public Instance Methods
setup()
click to toggle source
# File activesupport/test/notifications_test.rb, line 8 def setup @old_notifier = ActiveSupport::Notifications.notifier @notifier = ActiveSupport::Notifications::Fanout.new ActiveSupport::Notifications.notifier = @notifier @events = [] @named_events = [] @subscription = @notifier.subscribe { |*args| @events << event(*args) } @named_subscription = @notifier.subscribe("named.subscription") { |*args| @named_events << event(*args) } end
teardown()
click to toggle source
# File activesupport/test/notifications_test.rb, line 18 def teardown ActiveSupport::Notifications.notifier = @old_notifier end
Private Instance Methods
event(*args)
click to toggle source
# File activesupport/test/notifications_test.rb, line 24 def event(*args) ActiveSupport::Notifications::Event.new(*args) end