Module: ActionCable::Channel::ChannelStub
Relationships & Source Files | |
Defined in: | actioncable/lib/action_cable/channel/test_case.rb |
Overview
Action Cable Channel Stub
Stub #stream_from to track streams for the channel. Add public aliases for subscription_confirmation_sent?
and subscription_rejected?
.
Instance Attribute Summary
- #confirmed? ⇒ Boolean readonly
- #rejected? ⇒ Boolean readonly
Instance Method Summary
-
#start_periodic_timers
(also: #stop_periodic_timers)
Make periodic timers no-op.
- #stop_all_streams
-
#stop_periodic_timers
Alias for #start_periodic_timers.
- #stream_from(broadcasting)
- #streams
Instance Attribute Details
#confirmed? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'actioncable/lib/action_cable/channel/test_case.rb', line 25
def confirmed? subscription_confirmation_sent? end
#rejected? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'actioncable/lib/action_cable/channel/test_case.rb', line 29
def rejected? subscription_rejected? end
Instance Method Details
#start_periodic_timers Also known as: #stop_periodic_timers
Make periodic timers no-op
# File 'actioncable/lib/action_cable/channel/test_case.rb', line 46
def start_periodic_timers; end
#stop_all_streams
[ GitHub ]# File 'actioncable/lib/action_cable/channel/test_case.rb', line 37
def stop_all_streams @_streams = [] end
#stop_periodic_timers
Alias for #start_periodic_timers.
# File 'actioncable/lib/action_cable/channel/test_case.rb', line 47
alias stop_periodic_timers start_periodic_timers
#stream_from(broadcasting)
[ GitHub ]# File 'actioncable/lib/action_cable/channel/test_case.rb', line 33
def stream_from(broadcasting, *) streams << broadcasting end
#streams
[ GitHub ]# File 'actioncable/lib/action_cable/channel/test_case.rb', line 41
def streams @_streams ||= [] end