1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Michael Grosser
203998c916
allow running each test with pure ruby path/to/test.rb
also:
 - makes test dependencies obvious
 - makes tests runnable from within subfolders
2019-12-18 08:49:19 -06:00
Daniel Ritz
f3260272f2 fix(fork-tracker): Only patch fork if it's supported
Some tests are currently wrapped with
  `if Process.respond_to?(:fork)`
but they're still executed on JRuby. The problem is that ForkTracker
unconditionally patches `#fork` so `Process` does indeed
`respond_to? :fork`.

Fix it by installing the patch conditionally with the same check.
2019-10-06 23:41:37 +02:00
Étienne Barrié
7ca163d8c3 Also override Kernel#fork 2019-09-30 17:05:37 -04:00
Étienne Barrié
f223c795e8 Keep Object#fork private 2019-09-30 17:05:37 -04:00
Jean Boussier
78b9580e5f Introduce a callback for forked children
We hook into Kernel#fork and Process#fork, when they are invoked
we can trigger all the registered callbacks.

There is also a `check!` method that can be called to very cheaply
detect if the process was forked.
2019-09-30 12:04:59 +02:00