instance method
stub_connection
Ruby on Rails 6.0.6
Since v6.0.6Signature
stub_connection(identifiers = {})
Setup 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 219
def stub_connection(identifiers = {})
@connection = ConnectionStub.new(identifiers)
end
Defined in actioncable/lib/action_cable/channel/test_case.rb line 219
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::TestCase::Behavior