> Does this mean that the object is permanently modified to have this prepended module, even after the object has been reset? That's unfortunate (as I'd really like to restore the object to its original state), but I'm not sure if there's a way to avoid that.

I **think** so but this is a weird case because its the classes singleton class... so... it already behaves strangely...

> One other issue with this is that you will prepend N modules when N methods are stubbed. I'd much rather prepend just one module, and then reuse it for multiple stubbed methods. To facilitate that, you could probably define a custom subclass of module:

> `PrependedModule = Class.new(Module.new)`
...and then use that here rather than Module.new. Then it's easy to search through the ancestors to find an instance of PrependedModule, and re-use that module.

Can we refactor that on top of this as an improvement later? I'm nervous that this would break the lookup chain if you stubbed a "lower" sub class then a higher sub class...