class ActionCable::SubscriptionAdapter::Test

so it could be used in system tests too.
NOTE: Test adapter extends the ActionCable::SubscriptionsAdapter::Async adapter,
To use the test adapter set adapter value to test in your config/cable.yml file.
ActionCable::TestHelper it makes a great tool to test your Rails application.
The test adapter should be used only in testing. Along with
== Test adapter for Action Cable

def broadcast(channel, payload)

def broadcast(channel, payload)
  broadcasts(channel) << payload
  super
end

def broadcasts(channel)

def broadcasts(channel)
  channels_data[channel] ||= []
end

def channels_data

def channels_data
  @channels_data ||= {}
end

def clear

def clear
  @channels_data = nil
end

def clear_messages(channel)

def clear_messages(channel)
  channels_data[channel] = []
end