instance method assert_has_stream

Ruby on Rails 8.0.4

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

assert_has_stream(stream)

Asserts that the specified stream has been started.

def test_assert_started_stream
  subscribe
  assert_has_stream 'messages'
end

Parameters

stream req
Source
# File actioncable/lib/action_cable/channel/test_case.rb, line 304
        def assert_has_stream(stream)
          assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
        end

Defined in actioncable/lib/action_cable/channel/test_case.rb line 304 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionCable::Channel::TestCase::Behavior

Type at least 2 characters to search.

↑↓ navigate · open · esc close