Module: RSpec::Rails::Matchers
- Defined in:
- lib/rspec/rails/matchers/action_cable.rb,
lib/rspec/rails/matchers/action_cable/have_streams.rb,
lib/rspec/rails/matchers/action_cable/have_broadcasted_to.rb
Defined Under Namespace
Modules: ActionCable
Instance Method Summary collapse
-
#have_broadcasted_to(target = nil) ⇒ Object
(also: #broadcast_to)
Passes if a message has been sent to a stream/object inside a block.
Instance Method Details
#have_broadcasted_to(target = nil) ⇒ Object Also known as: broadcast_to
Passes if a message has been sent to a stream/object inside a block. May chain ‘at_least`, `at_most` or `exactly` to specify a number of times. To specify channel from which message has been broadcasted to object use `from_channel`.
51 52 53 54 55 |
# File 'lib/rspec/rails/matchers/action_cable.rb', line 51 def have_broadcasted_to(target = nil) check_action_cable_adapter ActionCable::HaveBroadcastedTo.new(target, channel: described_class) end |