spec/unit/realtime/client_spec.rb in ably-0.8.5 vs spec/unit/realtime/client_spec.rb in ably-0.8.6
- old
+ new
@@ -8,11 +8,11 @@
end
it_behaves_like 'a client initializer'
context 'delegation to the REST Client' do
- let(:client_options) { { key: 'appid.keyuid:keysecret' } }
+ let(:client_options) { { key: 'appid.keyuid:keysecret', auto_connect: false } }
it 'passes on the options to the initializer' do
rest_client = instance_double('Ably::Rest::Client', auth: instance_double('Ably::Auth'), options: client_options)
expect(Ably::Rest::Client).to receive(:new).with(client_options).and_return(rest_client)
subject
@@ -24,7 +24,11 @@
expect(subject.rest_client).to receive(attribute)
subject.public_send attribute
end
end
end
+ end
+
+ after(:all) do
+ sleep 1 # let realtime library shut down any open clients
end
end