Methods
T
Instance Public methods
test_event_is_pushed_even_without_block()
    # File activesupport/test/notifications_test.rb
295 def test_event_is_pushed_even_without_block
296   instrument(:awesome, payload: "notifications")
297   assert_equal 1, @events.size
298   assert_equal :awesome, @events.last.name
299   assert_equal Hash[payload: "notifications"], @events.last.payload
300 end
test_instrument_publishes_when_exception_is_raised()
    # File activesupport/test/notifications_test.rb
281 def test_instrument_publishes_when_exception_is_raised
282   begin
283     instrument(:awesome, payload: "notifications") do
284       raise "FAIL"
285     end
286   rescue RuntimeError => e
287     assert_equal "FAIL", e.message
288   end
289 
290   assert_equal 1, @events.size
291   assert_equal Hash[payload: "notifications",
292     exception: ["RuntimeError", "FAIL"], exception_object: e], @events.last.payload
293 end
test_instrument_returns_block_result()
    # File activesupport/test/notifications_test.rb
250 def test_instrument_returns_block_result
251   assert_equal 2, instrument(:awesome) { 1 + 1 }
252 end
test_instrument_yields_the_payload_for_further_modification()
    # File activesupport/test/notifications_test.rb
254 def test_instrument_yields_the_payload_for_further_modification
255   assert_equal 2, instrument(:awesome) { |p| p[:result] = 1 + 1 }
256   assert_equal 1, @events.size
257   assert_equal :awesome, @events.first.name
258   assert_equal Hash[result: 2], @events.first.payload
259 end
test_instrumenter_exposes_its_id()
    # File activesupport/test/notifications_test.rb
261 def test_instrumenter_exposes_its_id
262   assert_equal 20, ActiveSupport::Notifications.instrumenter.id.size
263 end
test_nested_events_can_be_instrumented()
    # File activesupport/test/notifications_test.rb
265 def test_nested_events_can_be_instrumented
266   instrument(:awesome, payload: "notifications") do
267     instrument(:wot, payload: "child") do
268       1 + 1
269     end
270 
271     assert_equal 1, @events.size
272     assert_equal :wot, @events.first.name
273     assert_equal Hash[payload: "child"], @events.first.payload
274   end
275 
276   assert_equal 2, @events.size
277   assert_equal :awesome, @events.last.name
278   assert_equal Hash[payload: "notifications"], @events.last.payload
279 end