Sha256: 25b38d151f5e7adec341d16b525439378edf20e31fc5f7c0952cb88d8f16902d

Contents?: true

Size: 680 Bytes

Versions: 8

Compression:

Stored size: 680 Bytes

Contents

RSpec.shared_context 'connected client' do
  let(:client) { Slack::RealTime::Client.new }
  let(:ws) { double(Slack::RealTime::Concurrency::Mock::WebSocket) }
  let(:url) { 'wss://ms173.slack-msgs.com/websocket/lqcUiAvrKTP-uuid=' }
  let(:socket) { double(Slack::RealTime::Socket, connected?: true) }
  before do
    Slack::RealTime.configure do |config|
      config.concurrency = Slack::RealTime::Concurrency::Mock
    end
    allow(Slack::RealTime::Socket).to receive(:new).with(url, ping: 30).and_return(socket)
    allow(socket).to receive(:start_sync).and_yield
    allow(socket).to receive(:connect!).and_yield(ws)
    allow(ws).to receive(:on)
    client.start!
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
slack-ruby-client-bhe-0.5.5 spec/support/real_time/connected_client.rb
slack-ruby-client-bhe-0.5.4 spec/support/real_time/connected_client.rb
slack-ruby-client-0.6.0 spec/support/real_time/connected_client.rb
slack-ruby-client-0.5.4 spec/support/real_time/connected_client.rb
slack-ruby-client-0.5.3 spec/support/real_time/connected_client.rb
slack-ruby-client-0.5.2 spec/support/real_time/connected_client.rb
slack-ruby-client-0.5.1 spec/support/real_time/connected_client.rb
slack-ruby-client-0.5.0 spec/support/real_time/connected_client.rb