Namespace
Methods
- C
- D
- T
Included Modules
Constants
| DEFAULT_PATH | = | "/cable" |
Attributes
| [R] | connection | |
| [R] | socket | |
| [R] | testserver |
Instance Public methods
connect(path = ActionCable.server.config.mount_path, server: ActionCable.server, **request_params) Link
Performs connection attempt to exert connect on the connection under test.
Accepts request path as the first argument and the following request options:
# File actioncable/lib/action_cable/connection/test_case.rb, line 294 def connect(path = ActionCable.server.config.mount_path, server: ActionCable.server, **request_params) path ||= DEFAULT_PATH @socket = TestSocket.new(TestSocket.build_request(path, **request_params, cookies: cookies)) @testserver = Connection::TestServer.new(server) connection = self.class.connection_class.new(@testserver, socket) connection.connect if connection.respond_to?(:connect) # Only set instance variable if connected successfully @connection = connection end
disconnect() Link
Exert disconnect on the connection under test.