spec/unit/realtime/channel_spec.rb in ably-1.1.7 vs spec/unit/realtime/channel_spec.rb in ably-1.1.8

- old
+ new

@@ -1,11 +1,11 @@ # encoding: utf-8 require 'spec_helper' require 'shared/protocol_msgbus_behaviour' describe Ably::Realtime::Channel do - let(:client) { double('client').as_null_object } + let(:client) { Ably::Realtime::Client.new(token: 'valid') } let(:channel_name) { 'test' } subject do Ably::Realtime::Channel.new(client, channel_name) end @@ -69,9 +69,10 @@ describe '#publish name argument' do let(:encoded_value) { random_str.encode(encoding) } let(:message) { instance_double('Ably::Models::Message', client_id: nil, size: 0) } before do + allow(subject).to receive(:enqueue_messages_on_connection).and_return(message) allow(subject).to receive(:create_message).and_return(message) allow(subject).to receive(:attach).and_return(:true) end context 'as UTF_8 string' do