RSpec timeout configuration inheritance behavior change in version 3.8
0 reputation · 03 Jul 2020, 12:39 UTC
The RSpec timeout feature introduced in version 3.8 allows a global limit to be set for each example, causing a Timeout::Error when exceeded. Currently this limit does not automatically apply to child example groups; each group or example must declare its own timeout metadata to obtain a different limit.
This lack of inheritance can lead to inconsistent timeout settings across a suite and raises the question of whether a configurable inheritance mode should be provided. The core team has discussed the trade‑offs but has not settled on a default behavior. Should the global timeout be inherited by nested groups unless overridden? Should an explicit configuration flag enable inheritance? How would inherited timeouts interact with explicitly set timeout metadata on a child group or example?