Example implementation and use of patchwork with magespec.
This is a quickly hacked together proof of concept to see if there is a way to work around Magento God class when writing tests. This is achieved by using the Patchwork Library
A pure PHP library that lets you redefine user-defined functions at runtime. In other words, Patchwork is a partial implementation of runkit_function_redefine in userland PHP 5.3 code.
This is by no means a final or even sane implementation; but rather an base idea to start working.