Class: RSpec::Rails::Matchers::ActionCable::HaveStream Private

Inherits:
Matchers::BuiltIn::BaseMatcher
  • Object
show all
Defined in:
lib/rspec/rails/matchers/action_cable/have_streams.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Provides the implementation for have_stream, have_stream_for, and have_stream_from. Not intended to be instantiated directly.

Instance Method Summary collapse

Instance Method Details

#does_not_match?(subscription) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


31
32
33
# File 'lib/rspec/rails/matchers/action_cable/have_streams.rb', line 31

def does_not_match?(subscription)
  !match(subscription)
end

#failure_messageString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


11
12
13
# File 'lib/rspec/rails/matchers/action_cable/have_streams.rb', line 11

def failure_message
  "expected to have #{base_message}"
end

#failure_message_when_negatedString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


17
18
19
# File 'lib/rspec/rails/matchers/action_cable/have_streams.rb', line 17

def failure_message_when_negated
  "expected not to have #{base_message}"
end

#matches?(subscription) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

Raises:

  • (ArgumentError)


23
24
25
26
27
# File 'lib/rspec/rails/matchers/action_cable/have_streams.rb', line 23

def matches?(subscription)
  raise(ArgumentError, "have_streams is used for negated expectations only") if no_expected?

  match(subscription)
end