instance method
advance_time
Ruby on Rails edge
Since edgeSignature
advance_time(seconds)
Advances all registered periodic timers by the given number of seconds, firing their blocks for each elapsed interval:
def test_timer
subscribe
advance_time 5.seconds
assert_equal 1, subscription.tick_count
end
Parameters
-
secondsreq
Source
# File actioncable/lib/action_cable/channel/test_case.rb, line 234
def advance_time(seconds)
testserver.advance_time(seconds)
end
Defined in actioncable/lib/action_cable/channel/test_case.rb line 234
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::ChannelExt::TestCase::Behavior