module RSpec::Rails::ChannelExampleGroup

def have_stream_for(object)

expect(subscription).to have_stream_for(user)
@example

Checks that the channel has been subscribed to a stream for the given model
def have_stream_for(object)
  check_subscribed!
  RSpec::Rails::Matchers::ActionCable::HaveStream.new(broadcasting_for(object))
end