diff --git a/lib/ably/rest/push.rb b/lib/ably/rest/push.rb index a03d0400c..7d33bb3a9 100644 --- a/lib/ably/rest/push.rb +++ b/lib/ably/rest/push.rb @@ -20,25 +20,6 @@ def initialize(client) def admin @admin ||= Admin.new(self) end - - # Activate this device for push notifications by registering with the push transport such as GCM/APNS - # - # @note This is unsupported in the Ruby library - def activate(*arg) - raise_unsupported - end - - # Deactivate this device for push notifications by removing the registration with the push transport such as GCM/APNS - # - # @note This is unsupported in the Ruby library - def deactivate(*arg) - raise_unsupported - end - - private - def raise_unsupported - raise Ably::Exceptions::PushNotificationsNotSupported, 'This device does not support receiving or subscribing to push notifications. All PushChannel methods are unavailable' - end end end end diff --git a/spec/acceptance/rest/push_spec.rb b/spec/acceptance/rest/push_spec.rb deleted file mode 100644 index cbb9c5e8f..000000000 --- a/spec/acceptance/rest/push_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -# encoding: utf-8 -require 'spec_helper' - -describe Ably::Rest::Push do - vary_by_protocol do - let(:default_options) { { key: api_key, environment: environment, protocol: protocol} } - let(:client_options) { default_options } - let(:client) do - Ably::Rest::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) - end - end - - describe '#deactivate' do - it 'raises an unsupported exception' do - expect { subject.deactivate('foo') }.to raise_error(Ably::Exceptions::PushNotificationsNotSupported) - end - end - end -end