forked from ably/ably-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push_spec.rb
27 lines (24 loc) · 811 Bytes
/
push_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# encoding: utf-8
require 'spec_helper'
describe Ably::Realtime::Push, :event_machine do
vary_by_protocol do
let(:default_options) { { key: api_key, environment: environment, protocol: protocol} }
let(:client_options) { default_options }
let(:client) do
Ably::Realtime::Client.new(client_options)
end
subject { client.push }
describe '#activate' do
it 'raises an unsupported exception' do
expect { subject.activate('foo') }.to raise_error(Ably::Exceptions::PushNotificationsNotSupported)
stop_reactor
end
end
describe '#deactivate' do
it 'raises an unsupported exception' do
expect { subject.deactivate('foo') }.to raise_error(Ably::Exceptions::PushNotificationsNotSupported)
stop_reactor
end
end
end
end