No release in over a year
Fiber scheduler spec
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 1.7

Runtime

~> 3.11
 Project Readme

Fiber scheduler spec

Building a Ruby fiber scheduler is hard. This gem helps with testing it.

Works with fiber schedulers in ruby 3.1.

This is NOT a specification, here are the official docs for fiber scheduler.

Installation

gem install fiber_scheduler_spec

Usage

Run all the specs on CustomFiberScheduler:

# spec/custom_fiber_scheduler/fiber_scheduler_spec.rb
require "fiber_scheduler_spec"

RSpec.describe CustomFiberScheduler do
  include_examples FiberSchedulerSpec
end

or

Run a subset of specs (just comment out example groups you don't need):

# spec/custom_fiber_scheduler/fiber_scheduler_spec.rb
require "fiber_scheduler_spec"

RSpec.describe CustomFiberScheduler do
  include_examples FiberSchedulerSpec::BlockUnblock
  include_examples FiberSchedulerSpec::Close
  include_examples FiberSchedulerSpec::Fiber
  include_examples FiberSchedulerSpec::IOWait
  include_examples FiberSchedulerSpec::KernelSleep
  include_examples FiberSchedulerSpec::NestedFiberSchedule
  include_examples FiberSchedulerSpec::ProcessWait
  include_examples FiberSchedulerSpec::SocketIO
  include_examples FiberSchedulerSpec::TimeoutAfter
end

More info

This gem assumes your fiber scheduler implements:

License

MIT