Sha256: 118c758f2e56b7cbcf495b95b107d8a0409f6fde164871906909821acfe530d6

Contents?: true

Size: 389 Bytes

Versions: 39

Compression:

Stored size: 389 Bytes

Contents

require 'spec_helper'

RSpec.describe Slack::RealTime::Client, vcr: { cassette_name: 'web/rtm_start' } do
  include_context 'connected client'

  describe '#ping' do
    before do
      allow(client).to receive(:next_id).and_return(42)
    end
    it 'sends message' do
      expect(socket).to receive(:send_data).with({ type: 'ping', id: 42 }.to_json)
      client.ping
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
slack-ruby-client-bhe-0.5.5 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-bhe-0.5.4 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.14.4 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.14.3 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.14.2 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.14.1 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.14.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.13.1 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.13.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.12.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.11.1 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.11.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.10.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.9.1 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.9.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.8.1 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.8.0 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.7.9 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.7.8 spec/slack/real_time/api/ping_spec.rb
slack-ruby-client-0.7.7 spec/slack/real_time/api/ping_spec.rb