spec/acceptance/realtime/client_spec.rb in ably-0.7.5 vs spec/acceptance/realtime/client_spec.rb in ably-0.7.6

- old
+ new

@@ -2,22 +2,22 @@ require 'spec_helper' describe Ably::Realtime::Client, :event_machine do vary_by_protocol do let(:default_options) do - { api_key: api_key, environment: environment, protocol: protocol } + { key: api_key, environment: environment, protocol: protocol } end let(:client_options) { default_options } let(:connection) { subject.connection } let(:auth_params) { subject.auth.auth_params } subject { Ably::Realtime::Client.new(client_options) } context 'initialization' do context 'basic auth' do - it 'is enabled by default with a provided :api_key option' do + it 'is enabled by default with a provided :key option' do connection.on(:connected) do expect(auth_params[:key_id]).to_not be_nil expect(auth_params[:access_token]).to be_nil expect(subject.auth.current_token).to be_nil stop_reactor @@ -56,10 +56,10 @@ stop_reactor end end end - context 'with valid :api_key and :use_token_auth option set to true' do + context 'with valid :key and :use_token_auth option set to true' do let(:client_options) { default_options.merge(use_token_auth: true) } it 'automatically authorises on connect and generates a token' do connection.on(:connected) do expect(subject.auth.current_token).to_not be_nil