Unit testing ActionCable channels with RSpec

Rails 5.1 doesn’t have official support for testing ActionCable channels yet. Here is the minimal example how to unit test a single channel action: