spec/acceptance/realtime/channel_history_spec.rb in ably-0.8.7 vs spec/acceptance/realtime/channel_history_spec.rb in ably-0.8.8
- old
+ new
@@ -17,11 +17,11 @@
let(:messages) { [] }
let(:options) { { :protocol => :json } }
it 'returns a SafeDeferrable that catches exceptions in callbacks and logs them' do
- channel.publish('event', payload) do |message|
+ channel.publish('event', payload) do
history = channel.history
expect(history).to be_a(Ably::Util::SafeDeferrable)
history.callback do |page|
expect(page.items.count).to eql(1)
expect(page).to be_a(Ably::Models::PaginatedResult)
@@ -30,11 +30,11 @@
end
end
context 'with a single client publishing and receiving' do
it 'retrieves realtime history' do
- channel.publish('event', payload) do |message|
+ channel.publish('event', payload) do
channel.history do |page|
expect(page.items.length).to eql(1)
expect(page.items[0].data).to eql(payload)
stop_reactor
end
@@ -42,11 +42,11 @@
end
end
context 'with two clients publishing messages on the same channel' do
it 'retrieves realtime history on both channels' do
- channel.publish('event', payload) do |message|
- channel2.publish('event', payload) do |message|
+ channel.publish('event', payload) do
+ channel2.publish('event', payload) do
channel.history do |page|
expect(page.items.length).to eql(2)
expect(page.items.map(&:data).uniq).to eql([payload])
channel2.history do |page_2|