module ActionCable::Connection::TestCase::Behavior

def disconnect

Exert #disconnect on the connection under test.
def disconnect
  raise "Must be connected!" if connection.nil?
  connection.disconnect if connection.respond_to?(:disconnect)
  @connection = nil
end