Sha256: 36ecd97db3e93f5f2f96f8bc3a16e6da1e487ecbe8c3624b03b67ebf604aea83
Contents?: true
Size: 919 Bytes
Versions: 7
Compression:
Stored size: 919 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'shared/client_initializer_behaviour' describe Ably::Realtime::Client do subject do Ably::Realtime::Client.new(client_options) end it_behaves_like 'a client initializer' context 'delegation to the REST Client' do let(:client_options) { { api_key: 'appid.keyuid:keysecret' } } 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 end context 'for attribute' do [:environment, :use_tls?, :log_level, :custom_host].each do |attribute| specify "##{attribute}" do expect(subject.rest_client).to receive(attribute) subject.public_send attribute end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems