spec/spec_helper.rb in async-0.9.1 vs spec/spec_helper.rb in async-0.10.0
- old
+ new
@@ -20,13 +20,13 @@
require "async"
require "async/tcp_socket"
require "async/udp_socket"
RSpec.shared_context "reactor" do
- let(:reactor) {Async::Reactor.new}
+ let(:reactor) {Async::Task.current.reactor}
around(:each) do |example|
- reactor.run do
+ Async::Reactor.run do
example.run
end
end
end