Methods
- R
- T
Instance Public methods
test_event_is_parent_based_on_time_frame()
Link
# File activesupport/test/notifications_test.rb, line 224 def test_event_is_parent_based_on_time_frame time = Time.utc(2009, 01, 01, 0, 0, 1) parent = event(:foo, Time.utc(2009), Time.utc(2009) + 100, random_id, {}) child = event(:foo, time, time + 10, random_id, {}) not_child = event(:foo, time, time + 100, random_id, {}) assert parent.parent_of?(child) assert !child.parent_of?(parent) assert !parent.parent_of?(not_child) assert !not_child.parent_of?(parent) end
test_events_are_initialized_with_details()
Link
# File activesupport/test/notifications_test.rb, line 210 def test_events_are_initialized_with_details time = Time.now event = event(:foo, time, time + 0.01, random_id, {}) assert_equal :foo, event.name assert_equal time, event.time assert_in_delta 10.0, event.duration, 0.00001 end
test_events_consumes_information_given_as_payload()
Link
Instance Protected methods