mock MyDatabaseConnector class ClassToMockWith ..code... end
Whatever class definition directly succeeds the invocation of "mock" will be temporarily substituted for the class specified as an argument to "mock". Specifically, in this case, any references to MyDatabaseConnector will be replaced with references to ClassToMockWith, so instantiating MyDatabaseConnector actually instantiates ClassToMockWith, and so on.
Rubyists reading this are probably thinking I’ve lost my mind, because this isn’t really a feature of the Ruby language. It’s just a simple (albeit powerful) extension that Brian has written. But, to someone coming from a history of work exclusively done in in one or more of the more static languages (Java, C#, etc.), it looks like a first-class part of the language.
This is what Guy Steele was talking about in his Growing a Language OOPSLA talk.