This helper may need some modification for the Thread specs but it abstracts the machinery for starting and ensuring the thread is running instead of having that littered throughout the specs.
This is done by Pry... Also see: rubinius/rubinius#1125
Notes: * Use ScratchPad for recording values rather than ad hoc local variables. * Use ScratchPad to instrument flow of control. * Keep version blocks together and simple. Don't use more than one version block for the same version unless different nested describes are needed. * Use nested describe blocks with their own before actions when needed. * Use consistent, intelligible values in specs (eg :thrown_key versus :blah) * Use do/end with multiline lambdas. * Don't duplicate specs. * Use different example blocks for different behavior (eg if the same exception is raised for different types). * Don't use an intermediate local if the expression is simple enough to fit on one line.
Kernel#catch() should pass the tag either given or generated to its block.
Specs for SystemExit#success? and for the default value for SystemExit#status.