Methods
- R
- T
Instance Public methods
test_event_cpu_time_does_not_raise_error_when_start_or_finished_not_called()
Link
Source: show
# File activesupport/test/notifications_test.rb 313 def test_event_cpu_time_does_not_raise_error_when_start_or_finished_not_called 314 time = Time.now 315 event = event(:foo, time, time + 0.01, random_id, {}) 316 317 assert_equal 0, event.cpu_time 318 end
test_event_is_parent_based_on_children()
Link
Source: show
# File activesupport/test/notifications_test.rb 326 def test_event_is_parent_based_on_children 327 time = Concurrent.monotonic_time 328 329 parent = event(:foo, Concurrent.monotonic_time, Concurrent.monotonic_time + 100, random_id, {}) 330 child = event(:foo, time, time + 10, random_id, {}) 331 not_child = event(:foo, time, time + 100, random_id, {}) 332 333 parent.children << child 334 335 assert parent.parent_of?(child) 336 assert_not child.parent_of?(parent) 337 assert_not parent.parent_of?(not_child) 338 assert_not not_child.parent_of?(parent) 339 end
test_events_are_initialized_with_details()
Link
Source: show
# File activesupport/test/notifications_test.rb 304 def test_events_are_initialized_with_details 305 time = Time.now 306 event = event(:foo, time, time + 0.01, random_id, {}) 307 308 assert_equal :foo, event.name 309 assert_equal time, event.time 310 assert_in_delta 10.0, event.duration, 0.00001 311 end
test_events_consumes_information_given_as_payload()
Link
Source: show
# File activesupport/test/notifications_test.rb 321 def test_events_consumes_information_given_as_payload 322 event = event(:foo, Concurrent.monotonic_time, Concurrent.monotonic_time + 1, random_id, payload: :bar) 323 assert_equal Hash[payload: :bar], event.payload 324 end
Instance Private methods