spec/acceptance/realtime/message_spec.rb in ably-1.0.5 vs spec/acceptance/realtime/message_spec.rb in ably-1.0.6
- old
+ new
@@ -282,11 +282,11 @@
let(:callbacks) do
{ client: 0, other: 0 }
end
it 'sends and receives the messages on both opened connections and calls the success callbacks for each message published', em_timeout: 10 do
- check_message_and_callback_counts = Proc.new do
+ check_message_and_callback_counts = lambda do
if echos[:client] == expected_echos && echos[:other] == expected_echos
# Wait for message backlog to clear
EventMachine.add_timer(0.5) do
expect(echos[:client]).to eql(expected_echos)
expect(echos[:other]).to eql(expected_echos)
@@ -648,10 +648,10 @@
let(:connection) { client.connection }
let(:client_options) { default_options.merge(:log_level => :fatal) }
let(:msgs_received) { [] }
it 'publishes the message again, later receives the ACK and only one message is ever received from Ably' do
- on_reconnected = Proc.new do
+ on_reconnected = lambda do |*args|
expect(message_state).to be_empty
EventMachine.add_timer(2) do
expect(message_state).to contain_exactly(:delivered)
# TODO: Uncomment once issue realtime#42 is resolved
# expect(msgs_received.length).to eql(1)