spec/unit/realtime/connection_spec.rb in ably-0.8.5 vs spec/unit/realtime/connection_spec.rb in ably-0.8.6
- old
+ new
@@ -3,11 +3,11 @@
describe Ably::Realtime::Connection do
let(:client) { instance_double('Ably::Realtime::Client', logger: double('logger').as_null_object) }
subject do
- Ably::Realtime::Connection.new(client)
+ Ably::Realtime::Connection.new(client, {})
end
before do
expect(EventMachine).to receive(:next_tick) # non_blocking_loop_while for delivery of messages async
subject.__incoming_protocol_msgbus__.off
@@ -57,7 +57,11 @@
subject.off_resume &additional_proc
subject.resumed
expect(callbacks.count).to eql(1)
end
end
+ end
+
+ after(:all) do
+ sleep 1 # let realtime library shut down any open clients
end
end