lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-0.7.5 vs lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-0.8.1

- old
+ new

@@ -1,11 +1,11 @@ # encoding: utf-8 require 'spec_helper' describe Ably::Realtime::Channel, :event_machine do vary_by_protocol do - let(:default_options) { { api_key: api_key, environment: environment, protocol: protocol } } + let(:default_options) { { key: api_key, environment: environment, protocol: protocol } } let(:client_options) { default_options } let(:client) { Ably::Realtime::Client.new(client_options) } let(:channel_name) { random_str } let(:payload) { random_str } @@ -156,11 +156,11 @@ end end context 'failure as a result of insufficient key permissions' do let(:restricted_client) do - Ably::Realtime::Client.new(default_options.merge(api_key: restricted_api_key, log_level: :fatal)) + Ably::Realtime::Client.new(default_options.merge(key: restricted_api_key, log_level: :fatal)) end let(:restricted_channel) { restricted_client.channel("cannot_subscribe") } it 'triggers failed event' do restricted_channel.attach @@ -200,10 +200,10 @@ it 'attaches to the channel successfully and resets the channel error_reason' do restricted_channel.attach restricted_channel.once(:failed) do restricted_client.close do # A direct call to #authorise is synchronous - restricted_client.auth.authorise(api_key: api_key) + restricted_client.auth.authorise(key: api_key) restricted_client.connect do restricted_channel.once(:attached) do expect(restricted_channel.error_reason).to be_nil stop_reactor