Sha256: 4d512f6cd7b7dcd55546c54f8d9ccb402326df5380df33302109a28a460e2915

Contents?: true

Size: 535 Bytes

Versions: 5

Compression:

Stored size: 535 Bytes

Contents

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-0.4.0 spec/support/real_time/connected_client.rb
slack-ruby-client-0.3.1 spec/support/real_time/connected_client.rb
slack-ruby-client-0.3.0 spec/support/real_time/connected_client.rb
slack-ruby-client-0.2.1 spec/support/real_time/connected_client.rb
slack-ruby-client-0.2.0 spec/support/real_time/connected_client.rb