Sha256: 9192748983994d1359ebc544d6e628f2fd06a245009bb54224f9e01a8313af78
Contents?: true
Size: 802 Bytes
Versions: 2
Compression:
Stored size: 802 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'minitest/autorun' require 'minitest/reporters' require 'libev_scheduler' class TestFiberProcess < MiniTest::Test def test_process_wait Thread.new do scheduler = Libev::Scheduler.new Fiber.set_scheduler scheduler Fiber.schedule do pid = Process.spawn("true") Process.wait(pid) # TODO test that scheduler was invoked. assert_predicate $?, :success? end end.join end def test_system Thread.new do scheduler = Libev::Scheduler.new Fiber.set_scheduler scheduler Fiber.schedule do system("true") # TODO test that scheduler was invoked (currently it's not). assert_predicate $?, :success? end end.join end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
libev_scheduler-0.2 | test/test_process.rb |
libev_scheduler-0.1 | test/test_process.rb |