Sha256: dab8903d78a55795cf464328ce2dfcf910bd348e0522d9a690a3e47c8eb57710
Contents?: true
Size: 897 Bytes
Versions: 5
Compression:
Stored size: 897 Bytes
Contents
require 'spec_helper' begin RSpec.describe Slack::RealTime::Concurrency::Celluloid::Socket do context 'with url' do let(:url) { 'wss://echo.websocket.org/websocket/xyz' } let(:logger) { ::Logger.new(STDOUT) } subject(:socket) { described_class.new(url, ping: 42, logger: logger) } let(:driver) { WebSocket::Driver::Client } let(:ws) { double(driver) } describe '#initialize' do it 'sets url' do expect(socket.url).to eq url end end describe '#connect!' do pending 'connects' pending 'pings every 30s' end describe '#disconnect!' do it 'closes and nils the websocket' do socket.instance_variable_set('@driver', ws) expect(ws).to receive(:close) socket.disconnect! end end pending 'send_data' end end rescue LoadError end
Version data entries
5 entries across 5 versions & 1 rubygems