Sha256: 906d7c9341144b41d824b24500737c7d97f5a45cefd29d6afd9404fd0def4d21

Contents?: true

Size: 480 Bytes

Versions: 39

Compression:

Stored size: 480 Bytes

Contents

require 'spec_helper'

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

  describe '#message' 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: 'message', id: 42, text: 'hello world', channel: 'channel' }.to_json)
      client.message(text: 'hello world', channel: 'channel')
    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/message_spec.rb
slack-ruby-client-bhe-0.5.4 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.4 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.3 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.2 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.1 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.13.1 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.13.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.12.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.11.1 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.11.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.10.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.9.1 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.9.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.8.1 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.8.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.7.9 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.7.8 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.7.7 spec/slack/real_time/api/message_spec.rb