123456789_123456789_123456789_123456789_123456789_

Module: RSpec::Rails::ChannelExampleGroup::ClassMethods

Overview

Class-level DSL for channel specs.

Instance Method Summary

Instance Method Details

#channel_class

This method is for internal use only.
[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/example/channel_example_group.rb', line 32

def channel_class
  (_channel_class || described_class).tap do |klass|
    next if klass <= ::ActionCable::Channel::Base

    raise "Described class is not a channel class.\n" \
          "Specify the channel class in the `describe` statement " \
          "or set it manually using `tests MyChannelClass`"
  end
end

#connection_class

This method is for internal use only.
[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/example/channel_example_group.rb', line 43

def connection_class
  (_connection_class || described_class).tap do |klass|
    next if klass <= ::ActionCable::Connection::Base

    raise "Described class is not a connection class.\n" \
          "Specify the connection class in the `describe` statement " \
          "or set it manually using `tests MyConnectionClass`"
  end
end