Having hard-coded class-names like in the example
Time.nowis effectively the same as communicating via global variables. DHH’s suggestion of stubbing out the Time class’s
nowis selling us mutable global variables as the solution to global variables. Or more precisely: passing an argument to a method by modifying a global variable that the method reads out and restoring the state of the global variable afterward.