The idea is that any form of `srand` should not be called unless it is absolutely intended. Even when running the RSpec test suite, that call to the real `srand` should take place exactly once (when starting up) and never within the scope of a test. This code prevents someone from invoking any form of `srand`, whether they realize it or not. They could be testing unrelated parts of `RSpec::Core::Runner.run`, which invokes `srand` indirectly.

I have taken a similar approach on other projects to guard against calls to external systems by wrapping those calls in a class/module that gets all methods stubbed in this fashion by default. You then find out quickly if any of those methods are unintentionally invoked instead of debugging weird side-effects.

That being said, this only works in the case that `srand` has a receiver, which is the case for all existing code, but this stubbing provides no protection to a direct call to `srand` with no receiver.