Sha256: c8e9422e735f596714bb0bfc331e5502ededfc5077ec9b2950b060a154acd633

Contents?: true

Size: 706 Bytes

Versions: 10

Compression:

Stored size: 706 Bytes

Contents

RSpec.shared_context 'connected client' do |opts|
  let(:client) { Slack::RealTime::Client.new(opts || {}) }
  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, logger: Slack::Logger.default).and_return(socket)
    allow(socket).to receive(:start_sync)
    allow(socket).to receive(:connect!)
    allow(ws).to receive(:on)
    client.start!
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
slack-ruby-client-0.8.1 spec/support/real_time/connected_client.rb
slack-ruby-client-0.8.0 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.9 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.8 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.7 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.6 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.5 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.4 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.3 spec/support/real_time/connected_client.rb
slack-ruby-client-0.7.2 spec/support/real_time/connected_client.rb