spec/acceptance/realtime/channel_history_spec.rb in ably-0.7.2 vs spec/acceptance/realtime/channel_history_spec.rb in ably-0.7.4
- old
+ new
@@ -15,13 +15,13 @@
let(:payload) { random_str }
let(:messages) { [] }
let(:options) { { :protocol => :json } }
- it 'returns a Deferrable' do
+ it 'returns a SafeDeferrable that catches exceptions in callbacks and logs them' do
channel.publish('event', payload) do |message|
history = channel.history
- expect(history).to be_a(EventMachine::Deferrable)
+ expect(history).to be_a(Ably::Util::SafeDeferrable)
history.callback do |messages|
expect(messages.count).to eql(1)
expect(messages).to be_a(Ably::Models::PaginatedResource)
stop_reactor
end