lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-0.9.1 vs lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-0.9.2
- old
+ new
@@ -365,14 +365,14 @@
next unless messages.length == 3
# All 3 messages should be batched into a single Protocol Message by the client library
# message.id = "{protocol_message.id}:{protocol_message_index}"
# Check that all messages share the same protocol_message.id
- message_id = messages.map { |msg| msg.id.split(':')[0] }
+ message_id = messages.map { |msg| msg.id.split(':')[0...-1].join(':') }
expect(message_id.uniq.count).to eql(1)
# Check that messages use index 0,1,2 in the ID
- message_indexes = messages.map { |msg| msg.id.split(':')[1] }
+ message_indexes = messages.map { |msg| msg.id.split(':').last }
expect(message_indexes).to include("0", "1", "2")
stop_reactor
end
end