rails/actioncable/test
Alex Ghiculescu c3c8abfbd7 assert_broadcasts: return the messages that were broadcast
This PR is similar to https://github.com/rails/rails/pull/47025, it makes Action Cable's `assert_broadcasts` return the messages that were broadast. This way you can do more analysis on them:

```ruby
    messages = assert_broadcasts("test", 2) do
      ActionCable.server.broadcast "test", { message: "one" }
      ActionCable.server.broadcast "test", { message: "two" }
    end
    assert_equal 2, messages.length
    assert_equal({ "message" => "one" }, messages.first)
    assert_equal({ "message" => "two" }, messages.last)
```

This is helpful if you expect lots of messages to be broadcast or if you want to only match on some element of the data; `assert_broadcast_on` doesn't work well in either of those scenarios.
2023-03-28 11:49:28 -06:00
..
channel [Action Cable] Stop logging filtered params 2023-02-08 17:22:39 +00:00
connection feat: action cable connection callbacks 2022-05-16 12:24:38 -07:00
javascript/src Allows adding more protocols to the WebSocket sub protocols 2022-10-19 09:00:15 +02:00
server Enable Style/RedundantBegin cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
stubs Merge pull request #47483 from palkan/fix/channel-test-case-test-server 2023-03-03 18:23:21 -05:00
subscription_adapter Increase redis subscription timeout in Action Cable test 2023-02-04 21:58:17 +10:30
client_test.rb Updates for Puma 6 2022-09-22 12:40:54 -05:00
javascript_package_test.rb Enforce that actioncable compiled JS bundle is in sync with source code 2019-10-19 02:26:31 +02:00
test_helper_test.rb assert_broadcasts: return the messages that were broadcast 2023-03-28 11:49:28 -06:00
test_helper.rb Enable verbose mode in test and report warnings as errors 2022-10-11 09:25:18 +02:00
worker_test.rb Inherit all actioncable's test classes from ActionCable::TestCase 2018-06-08 23:23:06 +03:00