lib/submodules/ably-ruby/spec/unit/realtime/channels_spec.rb in ably-rest-0.7.3 vs lib/submodules/ably-ruby/spec/unit/realtime/channels_spec.rb in ably-rest-0.7.5
- old
+ new
@@ -1,11 +1,11 @@
# encoding: utf-8
require 'spec_helper'
describe Ably::Realtime::Channels do
- let(:connection) { instance_double('Ably::Realtime::Connection', on: true) }
- let(:client) { instance_double('Ably::Realtime::Client', connection: connection) }
+ let(:connection) { instance_double('Ably::Realtime::Connection', unsafe_on: true, on_resume: true) }
+ let(:client) { instance_double('Ably::Realtime::Client', connection: connection, client_id: 'clientId') }
let(:channel_name) { 'unique' }
let(:options) { { 'bizarre' => 'value' } }
subject { Ably::Realtime::Channels.new(client) }
@@ -39,10 +39,10 @@
expect(block_called).to eql(true)
end
end
context 'destroying channels' do
- it '#release detatches and then releases the channel resoures' do
+ it '#release detaches and then releases the channel resources' do
released_channel = subject.get(channel_name, options)
expect(released_channel).to receive(:detach).and_yield
subject.release(channel_name)
expect(subject.get(channel_name, options).object_id).to_not eql(released_channel.object_id)
end