Skip to content

Commit cfab11c

Browse files
Action Cable assert_broadcasts API docs [ci skip]
Follow-up to [rails#48798][] Reverts [rails#47837][] The `capture_broadcasts` helper was introduced in [rails#48798][] to remove the return value from the `assert_broadcasts` call. The behavior was changed, but the corresponding documentation for the `assert_broadcasts` method did not revert the changes added in [rails#47837][]. This change should probably also get backported to `7-1-0-stable`. [rails#47837]: rails#47837 [rails#48798]: rails#48798 Co-authored-by: Matheus Richard <[email protected]>
1 parent cd4a5b0 commit cfab11c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

actioncable/lib/action_cable/test_helper.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,17 @@ def after_teardown # :nodoc:
3232
# end
3333
#
3434
# If a block is passed, that block should cause the specified number of messages
35-
# to be broadcasted. It returns the messages that were broadcasted.
35+
# to be broadcasted.
3636
#
3737
# def test_broadcasts_again
38-
# message = assert_broadcasts('messages', 1) do
38+
# assert_broadcasts('messages', 1) do
3939
# ActionCable.server.broadcast 'messages', { text: 'hello' }
4040
# end
41-
# assert_equal({ text: 'hello' }, message)
4241
#
43-
# messages = assert_broadcasts('messages', 2) do
42+
# assert_broadcasts('messages', 2) do
4443
# ActionCable.server.broadcast 'messages', { text: 'hi' }
4544
# ActionCable.server.broadcast 'messages', { text: 'how are you?' }
4645
# end
47-
# assert_equal 2, messages.length
48-
# assert_equal({ text: 'hi' }, messages.first)
49-
# assert_equal({ text: 'how are you?' }, messages.last)
5046
# end
5147
#
5248
def assert_broadcasts(stream, number, &block)

0 commit comments

Comments
 (0)