Skip to content

Instantly share code, notes, and snippets.

@dabit
Created June 9, 2020 15:16
Show Gist options
  • Save dabit/b132640b5a5cb06603643ca6ab95b075 to your computer and use it in GitHub Desktop.
Save dabit/b132640b5a5cb06603643ca6ab95b075 to your computer and use it in GitHub Desktop.
class StimulusReflex::TestCase < ActionCable::Connection::TestCase
tests ApplicationCable::Connection
def channel
@channel = StimulusReflex::Channel.new connect, "test"
end
def reflex_class
self.class.determine_constant_from_test_name(self.class_name) { |constant| constant }
end
def reflex
@reflex ||= reflex_class.new channel
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment