spec/unit/models/presence_message_spec.rb in ably-1.0.7 vs spec/unit/models/presence_message_spec.rb in ably-1.1.0

- old
+ new

@@ -545,10 +545,10 @@ it 'creates a duplicate of the message without any ProtocolMessage dependency' do clone = model.shallow_clone(id: 'newId', action: 1, timestamp: protocol_message_timestamp + 1000) expect(clone.id).to match(/newId/) expect(clone.connection_id).to eql(protocol_connection_id) - expect(as_since_epoch(clone.timestamp)).to eq(protocol_message_timestamp + 1000) + expect(as_since_epoch(clone.timestamp)).to be_within(5).of(protocol_message_timestamp + 1000) expect(clone.action).to eq(1) end context 'with an invalid ProtocolMessage (missing an ID)' do let(:protocol_message) {