spec/slack/real_time/client_spec.rb in slack-ruby-client-0.7.1 vs spec/slack/real_time/client_spec.rb in slack-ruby-client-0.7.2
- old
+ new
@@ -49,11 +49,11 @@
describe '#start!' do
let(:socket) { double(Slack::RealTime::Socket, connected?: true) }
before do
allow(Slack::RealTime::Socket).to receive(:new).with(url, ping: 30, logger: Slack::Logger.default).and_return(socket)
allow(socket).to receive(:connect!)
- allow(socket).to receive(:start_sync).and_yield
+ allow(socket).to receive(:start_sync)
client.start!
end
context 'properties provided upon connection' do
it 'sets url' do
expect(client.url).to eq url
@@ -252,11 +252,11 @@
context 'start!' do
let(:socket) { double(Slack::RealTime::Socket, connected?: true) }
before do
allow(Slack::RealTime::Socket).to receive(:new).and_return(socket)
allow(socket).to receive(:connect!)
- allow(socket).to receive(:start_sync).and_yield
+ allow(socket).to receive(:start_sync)
end
it 'calls rtm_start with start options' do
expect(client.web_client).to receive(:rtm_start).with(simple_latest: true).and_call_original
client.start!
end
@@ -280,10 +280,10 @@
context 'start!' do
let(:socket) { double(Slack::RealTime::Socket, connected?: true) }
before do
allow(Slack::RealTime::Socket).to receive(:new).and_return(socket)
allow(socket).to receive(:connect!)
- allow(socket).to receive(:start_sync).and_yield
+ allow(socket).to receive(:start_sync)
end
it 'instantiates the correct store class' do
client.start!
expect(client.store).to be_a Slack::RealTime::Stores::Starter
end