Module: RSpec::Rails::ChannelExampleGroup::ClassMethods
Relationships & Source Files | |
Defined in: | rspec-rails/lib/rspec/rails/example/channel_example_group.rb, rspec-rails/lib/rspec/rails/example/channel_example_group.rb |
Overview
Class-level DSL for channel specs.
Instance Method Summary
- #channel_class Internal use only Internal use only
- #connection_class Internal use only Internal use only
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