Skip to content

Commit

Permalink
Revert "Merge pull request #47837 from sampatbadhe/patch-5"
Browse files Browse the repository at this point in the history
This reverts commit 08203b8, reversing
changes made to 055572e.

Manual backport of cfab11c

Action Cable docs on main are markdown now so the cherry-pick isn't
clean.

Co-authored-by: Sean Doyle <sean.p.doyle24@gmail.com>
Co-authored-by: Matheus Richard <matheusrichardt@gmail.com>
  • Loading branch information
3 people committed Feb 19, 2024
1 parent cd9c0c5 commit 142f806
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions actioncable/lib/action_cable/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,17 @@ def after_teardown # :nodoc:
# end
#
# If a block is passed, that block should cause the specified number of
# messages to be broadcasted. It returns the messages that were broadcasted.
# messages to be broadcasted.
#
# def test_broadcasts_again
# message = assert_broadcasts('messages', 1) do
# assert_broadcasts('messages', 1) do
# ActionCable.server.broadcast 'messages', { text: 'hello' }
# end
# assert_equal({ text: 'hello' }, message)
#
# messages = assert_broadcasts('messages', 2) do
# assert_broadcasts('messages', 2) do
# ActionCable.server.broadcast 'messages', { text: 'hi' }
# ActionCable.server.broadcast 'messages', { text: 'how are you?' }
# end
# assert_equal 2, messages.length
# assert_equal({ text: 'hi' }, messages.first)
# assert_equal({ text: 'how are you?' }, messages.last)
# end
#
def assert_broadcasts(stream, number, &block)
Expand Down

0 comments on commit 142f806

Please sign in to comment.