lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-1.0.5 vs lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-1.0.6

- old
+ new

@@ -1340,11 +1340,11 @@ end end context 'many times with different event names' do it 'filters events accordingly to each callback' do - click_callback = proc { |message| messages << message } + click_callback = lambda { |message| messages << message } channel.subscribe('click', &click_callback) channel.subscribe('move', &click_callback) channel.subscribe('press', &click_callback) @@ -1956,11 +1956,11 @@ %w(suspended detached failed).each do |channel_state| context(channel_state) do specify 'all queued messages fail with NACK (#RTL11)' do channel.attach do # Move to disconnected - disconnect_transport_proc = Proc.new do + disconnect_transport_proc = lambda do if connection.transport connection.transport.close_connection_after_writing else EventMachine.next_tick { disconnect_transport_proc.call } end @@ -2088,10 +2088,10 @@ let(:client_options) { default_options.merge(channel_retry_timeout: 2, realtime_request_timeout: 1, log_level: :fatal) } it 'will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)' do connection.once(:connected) do # Prevent any incoming or outgoing ATTACH/ATTACHED message from Ably - prevent_protocol_messages_proc = Proc.new do + prevent_protocol_messages_proc = lambda do if client.connection.transport client.connection.transport.__incoming_protocol_msgbus__.unsubscribe client.connection.transport.__outgoing_protocol_msgbus__.unsubscribe else EventMachine.next_tick { prevent_protocol_messages_proc.call }