lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb in ably-rest-0.9.0 vs lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb in ably-rest-0.9.1

- old
+ new

@@ -67,14 +67,11 @@ { limit: 100 } end let(:endpoint) do - client.endpoint.tap do |client_end_point| - client_end_point.user = key_name - client_end_point.password = key_secret - end + client.endpoint end let!(:get_stub) { query_params = query_options.map { |k, v| "#{k}=#{v}" }.join('&') stub_request(:get, "#{endpoint}/channels/#{Addressable::URI.encode(channel_name)}/presence?#{query_params}"). to_return(:body => '{}', :headers => { 'Content-Type' => 'application/json' }) @@ -180,14 +177,11 @@ let(:channel_name) { "persisted:#{random_str(4)}" } let(:presence) { client.channel(channel_name).presence } let(:user) { 'appid.keyuid' } let(:secret) { random_str(8) } let(:endpoint) do - client.endpoint.tap do |client_end_point| - client_end_point.user = user - client_end_point.password = secret - end + client.endpoint end let(:client) do Ably::Rest::Client.new(key: "#{user}:#{secret}") end let(:history_options) do @@ -308,13 +302,10 @@ describe 'decoding permutations using mocked #history', :webmock do let(:user) { 'appid.keyuid' } let(:secret) { random_str(8) } let(:endpoint) do - client.endpoint.tap do |client_end_point| - client_end_point.user = user - client_end_point.password = secret - end + client.endpoint end let(:client) do Ably::Rest::Client.new(client_options.merge(key: "#{user}:#{secret}")) end