module RSpec::Rails::ChannelExampleGroup

@api public Container module for channel spec functionality. It is only available if ActionCable has been loaded before it.

Container module for channel spec functionality.

Public Instance Methods

have_rejected_connection() click to toggle source
# File lib/rspec/rails/example/channel_example_group.rb, line 42
def have_rejected_connection
  raise_error(::ActionCable::Connection::Authorization::UnauthorizedError)
end
have_stream_for(object) click to toggle source
# File lib/rspec/rails/example/channel_example_group.rb, line 58
def have_stream_for(object)
  check_subscribed!

  RSpec::Rails::Matchers::ActionCable::HaveStream.new(broadcasting_for(object))
end
have_stream_from(stream) click to toggle source
# File lib/rspec/rails/example/channel_example_group.rb, line 52
def have_stream_from(stream)
  check_subscribed!

  RSpec::Rails::Matchers::ActionCable::HaveStream.new(stream)
end
have_streams() click to toggle source
# File lib/rspec/rails/example/channel_example_group.rb, line 46
def have_streams
  check_subscribed!

  RSpec::Rails::Matchers::ActionCable::HaveStream.new
end