W3cubDocs

/Ruby on Rails 6.0

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?() Show source
# File actioncable/lib/action_cable/channel/test_case.rb, line 22
def confirmed?
  subscription_confirmation_sent?
end
rejected?() Show source
# File actioncable/lib/action_cable/channel/test_case.rb, line 26
def rejected?
  subscription_rejected?
end
start_periodic_timers() Show source
# File actioncable/lib/action_cable/channel/test_case.rb, line 43
def start_periodic_timers; end

Make periodic timers no-op

Also aliased as: stop_periodic_timers
stop_all_streams() Show source
# File actioncable/lib/action_cable/channel/test_case.rb, line 34
def stop_all_streams
  @_streams = []
end
stop_periodic_timers()
stream_from(broadcasting, *) Show source
# File actioncable/lib/action_cable/channel/test_case.rb, line 30
def stream_from(broadcasting, *)
  streams << broadcasting
end
streams() Show source
# File actioncable/lib/action_cable/channel/test_case.rb, line 38
def streams
  @_streams ||= []
end

© 2004–2019 David Heinemeier Hansson
Licensed under the MIT License.