module ActionCable::Channel::ChannelStub

Stub `stream_from` to track streams for the channel. Add public aliases for `subscription_confirmation_sent?` and `subscription_rejected?`.

Public Instance Methods

confirmed?() click to toggle source
# File lib/action_cable/channel/test_case.rb, line 21
def confirmed?
  subscription_confirmation_sent?
end
rejected?() click to toggle source
# File lib/action_cable/channel/test_case.rb, line 25
def rejected?
  subscription_rejected?
end
start_periodic_timers() click to toggle source

Make periodic timers no-op

# File lib/action_cable/channel/test_case.rb, line 42
def start_periodic_timers; end
Also aliased as: stop_periodic_timers
stop_all_streams() click to toggle source
# File lib/action_cable/channel/test_case.rb, line 33
def stop_all_streams
  @_streams = []
end
stop_periodic_timers()
stream_from(broadcasting, *) click to toggle source
# File lib/action_cable/channel/test_case.rb, line 29
def stream_from(broadcasting, *)
  streams << broadcasting
end
streams() click to toggle source
# File lib/action_cable/channel/test_case.rb, line 37
def streams
  @_streams ||= []
end