Sha256: fdb58b63c1a286856bc15f632fd2e0acb7fdcc94e01f515a9bca26286e4bd963

Contents?: true

Size: 563 Bytes

Versions: 13

Compression:

Stored size: 563 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.shared_examples_for 'a realtime socket' do
  let(:url) { 'wss://ms174.slack-msgs.com/websocket/xyz' }
  let(:logger) { ::Logger.new($stdout) }
  let(:socket) { described_class.new(url, ping: 42, logger: logger) }
  describe '#initialize' do
    it 'sets url' do
      expect(socket.url).to eq url
    end
  end

  describe 'api' do
    %i[start_sync start_sync disconnect! connect! connected? send_data close].each do |m|
      it m do
        expect(socket).to respond_to(m)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-2.3.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-2.2.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-2.1.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-2.0.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-1.1.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-1.0.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-0.17.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-0.16.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-0.15.1 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-0.15.0 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-0.14.6 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
slack-ruby-client-0.14.5 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb