class RSpec::Rails::Matchers::ActionCable::HaveBroadcastedTo

def check_channel_presence

def check_channel_presence
  return if @channel.present? && @channel.respond_to?(:channel_name)
  error_msg = "Broadcasting channel can't be inferred. Please, specify it with `from_channel`"
  raise ArgumentError, error_msg
end