Sha256: da5d3581501c8cdc6500c837fb37f8fa795ce5e145f0f105cfbef38e19ee3f45

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

require 'spec_helper'

describe Ably::Realtime::Client, '#stats', :event_machine do
  vary_by_protocol do
    let(:client) do
      Ably::Realtime::Client.new(api_key: api_key, environment: environment, protocol: protocol)
    end

    describe 'fetching stats' do
      it 'should return a PaginatedResource' do
        client.stats do |stats|
          expect(stats).to be_a(Ably::Models::PaginatedResource)
          stop_reactor
        end
      end

      it 'should return a Deferrable object' do
        expect(client.stats).to be_a(EventMachine::Deferrable)
        stop_reactor
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
ably-rest-0.7.3 lib/submodules/ably-ruby/spec/acceptance/realtime/stats_spec.rb
ably-0.7.2 spec/acceptance/realtime/stats_spec.rb