跳至内容 跳至搜索

Action Cable Channel 存根

存根 stream_from 以跟踪通道的流。为 subscription_confirmation_sent?subscription_rejected? 添加公共别名。

方法
C
R
S

实例公共方法

confirmed?()

# File actioncable/lib/action_cable/channel/test_case.rb, line 25
def confirmed?
  subscription_confirmation_sent?
end

rejected?()

# File actioncable/lib/action_cable/channel/test_case.rb, line 29
def rejected?
  subscription_rejected?
end

start_periodic_timers()

使定期计时器成为无操作

# File actioncable/lib/action_cable/channel/test_case.rb, line 46
def start_periodic_timers; end

stop_all_streams()

# File actioncable/lib/action_cable/channel/test_case.rb, line 37
def stop_all_streams
  @_streams = []
end

stop_periodic_timers()

stream_from(broadcasting, *)

# File actioncable/lib/action_cable/channel/test_case.rb, line 33
def stream_from(broadcasting, *)
  streams << broadcasting
end

streams()

# File actioncable/lib/action_cable/channel/test_case.rb, line 41
def streams
  @_streams ||= []
end