instance method
stub_connection
Ruby on Rails 7.0.10
Since v6.0.6Signature
stub_connection(identifiers = {})
Set up test connection with the specified identifiers:
class ApplicationCable < ActionCable::Connection::Base identified_by :user, :token end stub_connection(user: users[:john], token: 'my-secret-token')
Parameters
-
identifiersopt = {}
Source
# File actioncable/lib/action_cable/channel/test_case.rb, line 234
def stub_connection(identifiers = {})
@connection = ConnectionStub.new(identifiers)
end
Defined in actioncable/lib/action_cable/channel/test_case.rb line 234
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::TestCase::Behavior