spec/slack/real_time/api/message_spec.rb in slack-ruby-client-0.14.4 vs spec/slack/real_time/api/message_spec.rb in slack-ruby-client-0.14.5
- old
+ new
@@ -1,15 +1,20 @@
+# frozen_string_literal: true
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)
+ 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